The "415 Unsupported Media Type" error is telling you that the server will not accept your POST request. Your request is absolutely fine, it's the server that's mis-configured.
MappingJacksonHttpMessageConverter
will automatically set the request content-type header to application/json
, and my guess is that your server is rejecting that. You haven't told us anything about your server setup, though, so I can't really advise you on that.