REST Webservice returning 415 - Unsupported Media Type
I had the same 415
http error time ago. I simply forgot the default no-parameters constructor in my DTO classes. Adding that constructor, in a similar way as for JPA entities, solved my issue and de-serialization JSON->Object
works now.
I'm not sure this is your case, looking at your code, but it could be useful to other guys falling here looking at the 415+JSON issue. Regards
As others have pointed out, you are missing the correct header. Add Content-Type: application/json
to the "Headers":
You need to send the request-header Content-Type: application/json
. Seems like REST-Client does not add this header automatically for you.