I'm using Spring boot 1.4.0, Consider below code in a @RestController
, what I expect is, the server side will receive a http body with form_urlencoded content type, but unfortunately it demands me a query
parameter type with email
and token
. What's the problem here and how to fix?
@DeleteMapping(consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void removeAdmin(@RequestParam(value = "email") String email, @RequestParam(value = "token") String token) {
//...
}