Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Experimentation for Engineers: From A/B testing to Bayesian optimization
this week in the
Design
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Spring
AngularJS $http.post to @requestBody Spring
Itamar Levi
Greenhorn
Posts: 20
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
Client code :
var postObject = new Object(); postObject.name = "aa"; postObject.rowData = "jjj"; $http.post("http://localhost:8080/Architect/admin/popp.htm", postObject) .success(function (response) {alert("success post"); });
Server code:
@RequestMapping(value = "/popp" , method = RequestMethod.POST) public @ResponseBody String enableOssModule2(@RequestBody MData mData){ System.out.println(mData); return null; }
I am getting
POST
http://localhost:8080/Architect/admin/popp.htm
415 (Unsupported Media Type)
What is the problem?
Thank's
Itamar levi.
Hey cool! They got a blimp! But I have a tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
POST request via RestTemplate in JSON
Spring mvc request mapping for POST JSON request not working.
Writing a Restful API as well as Returning Model and View in Spring MVC
Spring Consume xml ?
Fail to include js file in WEB-INF directory with angular ng-include
More...