@RequestMapping(value = "/api/login", method = RequestMethod.POST)
public WelcomeMessage getHelloWorld(@RequestParam(value = "username") final String username, @RequestParam(value = "password") final String password) {
// do some thing
}
I was having the problem to get post parameter via REST request. Adding the header "Content-Type:application/x-www-form-urlencoded" fixed the issue
No comments:
Post a Comment