Closed cristian1703 closed 7 years ago
Correct me if I'm wrong, but doesn't the Content-Type have to be "multipart/form-data" if you want to work with files? Shouldn't we look into the issue with the header you currently have now? (application/json)
I have encountered a similar problem when using laravel. Any solution or hack to this?
What behavior of Retrofit is problematic here? The request body looks fine.
So I am trying to make a PUT request to upload a image and an object. Everything seems ok ( except maybe the fact that the content-type for the object is
application/json
instead ofmultipart/form-data
) but the server does not receive any data. On the server side I use laravel and PHP. In my app:My OkHttpinterceptor:
My REQUEST looks like this:
In laravel:
Any idea about what am I doing wrong? Thank you all for your time!