File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "POST request via RestTemplate in JSON" Watch "POST request via RestTemplate in JSON" New topic

POST request via RestTemplate in JSON

Johnny Bee

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?
Consider Paul's rocket mass heater.
subject: POST request via RestTemplate in JSON
Similar Threads
Spring MVC problem
Spring Consume xml ?
spring mvc xmlbean object JSON mapping error
org.springframework.web.HttpSessionRequiredException: Session attribute 'user' required - not found
Send/receive request from jsp to a Spring portlet.