When I'm trying to consume a Spring MVC method using FF RESTClient, I get the following error:
The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
This is the method declaration:
@RequestMapping(value = "/login", method = RequestMethod.POST)
public ResponseWrapper login(@RequestParam("email") @NotNull @Size(min=3, max=50) final String email,
@RequestParam("password") @NotNull @Size(min=8, max=50) final String password,
final HttpSession session) {
I entered the correct URL, method POST, and in the "Body" section I wrote:
email=admin&password=87654321
I also added the "Content-Type" header with value of "application/x-www-form-urlencoded" as suggested here: Firefox Add-on RESTclient - How to input POST parameters?
The Java code is correct and I can't change it. I have to fix the problem in Firefox RESTClient.
Any help will be profoundly appreciated!
Edit:
I changed a few things and then changed it back and now in works well, don't know why. Anyway I'd be glad if the moderators could delete this question.