i have a rest service in spring with tomcat server, with this declaration:
public @ResponseBody User addUser(@RequestBody User user) {
I need to call from an android client to it, im using androidanotations library with Spring Rest Library. My code is:
@Post("/addUser")
@Accept(MediaType.APPLICATION_JSON)
public User addUser(User user);
But when i do the request, server response me 400, bad request.
The User class is serializable, what is wrong?
Check this list:
To trace what is really sent to server you can use a Request filter like this .
Good luck.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.