I'm using Spring MVC with Spring boot for implements REST in our project. And we are using Embedded Tomcat as our web-server.I encountered an issue recently.
This is how my POST service handler looks like
@RequestMapping(value = "/v2", method = RequestMethod.POST,consumes ={"application/json", "text/plain","application/x-www-form-urlencoded" })
public void handleV2(@RequestBody String json){
log.info("Post body received : "+json);
}
When client sends % character in post body with content-type:application/x-www-form-urlencoded, json is received as empty.
There are no issues if the client sends % in post body with content-type:application/json . I couldn't figure out what the issue is.
First I thought this could be a client side issue. But my colleague who implemented the same handler in python has no issues with this.
Thanks in advance for the help.