1

Our REST APIs consumes Content-Type : application/x-www-form-urlencoded as input. The request contains form parameters with values as JSON. Eg.

URI :  /abc/id   
    Request Body : 
    param1 : {"name":"vineet", "age" : "9"}  --JSON
    param2 : {"city":"delhi","state":"delhi"}  --JSON

But when the input is mapped to the request object the values are coming as

        param1 : {name : vineet, age : 9},
        param2 : {city : delhi,state : delhi}

Qoutes are missing. so it comes as invalid JSON.

Vineet Singla
  • 1,609
  • 2
  • 20
  • 34

1 Answers1

0

This answer may help you to understand what you looking for.

Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported for @RequestBody MultiValueMap

gajju_15
  • 527
  • 4
  • 17