But I get an error saying that it can't serialize the stream to JSON. Following the API documentation do I have to place the stream as a param? Also what is the correct way to implement this? I would love if I didn't have to put a file size limit on the user, hence the streams. Though I have gotten it to work with small files encoded in Base64 and placed directly as a param...

Any help is greatly appreciated! I will definitely not downvote comments or answers for small pointers.

Answers

Looks like you're using Spring for Android. Judging that error message it seems Spring forces the content type to be application/json, while I believe you're trying to send application/x-www-form-urlencoded. So set this Content-Type header:

headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);

Spring will know then to match the proper MessageConverter. More info on this here.

EDIT: Also, you're supposed to send the request data in POST data, not in request URI. Move that to a MultiValuesMap. Have a look at the link I gave you how to post such data. A complete documentation on these can also be found here.

EDIT2 You need to set the MessageConverter for your response as well. Something like:

EDIT3 If you need to send files, consider using Resource, to be more specific InputStreamResource. But there is a trick: you need to provide the file name and the file size, otherwise your request will crash. Something like: