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": {
        "data": {
            "Key": "keydata",
            "param": {
                "title": "Testingpostmultipartimageupload",
                "photo": **"IMAGE BYTE DATA"**
            }
        }
    }
}
Any clues?
Ok, I found a solution using multipart, somethings like that:
@Multipart
@PUT("/users/{id}")
void modifyPic(
    @Header("auth_token") String token,
    @Path("id") int userid,
    @Part("request[data][param][title]") String title,
    @Part("request[data][param][Photo]") TypedFile avatar,
    Callback<User> cb
);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With