GeeCON Prague 2014*
The moose likes Spring and the fly likes POST request via RestTemplate in JSON Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "POST request via RestTemplate in JSON" Watch "POST request via RestTemplate in JSON" New topic
Author

POST request via RestTemplate in JSON

Johnny Bee
Greenhorn

Joined: Nov 02, 2010
Posts: 1
Hello guys,

I didn't find any example how to solve my problem, so I want to ask you for help. I can't simply send POST request using RestTemplate object in JSON

Every time I get org.springframework.web.client.HttpClientErrorException: 415 Unsupported Media Type

I use RestTemplate in this way:



My controller is:



What is my fault?
 
GeeCON Prague 2014
 
subject: POST request via RestTemplate in JSON