I would like to do a PUT request with this JSON body (containing a picture) and with Retrofit. I\'m using it under Android:
{
\"Request\": {
\"da
Retrofit only takes multipart and requestbody for its multipart.
Call loadLevel1halfIconswithImage(@Part("headerdata[relation][icon_type]") RequestBody icon_type, @Part("headerdata[relation][name]") RequestBody name, @Part MultipartBody.Part file);
And then in java
// MultipartBody.Part is used to send also the actual filename
MultipartBody.Part body = MultipartBody.Part.createFormData("headerdata[relation][relative_image]", fileUpload.getName(), requestFile);
call = service.loadLevel1halfIconswithImage(icon_type, name, body);