Hi All,
Below is my code to upload file to a third party service:
Response r = rs.
config(RestAssured.config().encoderConfig(EncoderConfig.encoderConfig().appendDefaultContentCharsetToContentTypeIfUndefined(false))).
urlEncodingEnabled(false).
multiPart(new File(pathForImage)).
put(uploadURL);
return r;
In the above code, I get the response as 200 OK. But the problem here is the actual file is not uploaded. Only the PUT request is made with the empty body.
Have anyone faced this issue earlier?
The only difference here is, I am instructing RA not to add any ContentType using the second line of code(I need to do this because the service that I am using to upload file expects the ContentType to be empty)
Any help is greatly appreciated.
Thanks,
Harisha Talanki