I'm trying to write a rest endpoint which receives application/x-www-form-urlencoded. But the endpoint does not accept request parameters for @RequestBody or @RequestParam
I Have tried using MultiValueMap to grab the request parameters. But I always get 0 parameters. Is there a way to get request values to the MultiValueMap or some other POJO class.
AD=&value=sometestvalue
- This is the application/x-www-form-urlencoded requestbody. I'm trying to do the request using postman
@RequestMapping(value = "/test/verification/pay/{id}", method = RequestMethod.POST,
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
@ResponseBody
public Response testVerificationPay(@PathVariable("id") long id, @RequestParam MultiValueMap formData,
HttpServletRequest servletRequest, ServiceContext serviceContext){
log.info("!--REQUEST START--!"+formData.toString());
}