0

I'm building a RequestBody this way:

RequestBody requestBody;
MultipartBody.Builder builder = new MultipartBody.Builder().
.setType(MultipartBody.FORM);

builder = builder.addFormDataPart("key1", "value1");
builder = builder.addFormDataPart("key2", "value2");
etc..

However, I now need to add an integer (not an integer value as string). addFormDataPart only accepts strings. I see that it can also accept another RequestBody, but I can't figure out if that could help me or not.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
user982687
  • 325
  • 6
  • 14

0 Answers0