In my Spring Boot project, I want to transmit data through application/x-www-form-urlencoded. I used @RequestParam(defaultValue = "token") MultiValueMap values to receive parameters, but I couldn't get the parameters. Debugging showed that the size was 0. 123 2 3

Comment From: varunu28

@charlesChou321 Shouldn't the request be taking RequestBody instead of RequestParam if you are setting the params in body through Postman?

Comment From: varunu28

I was able to get the params successfully but I had to set it in the url request param. Here is what my request looks like(I have a GET request instead of POST)

curl -G "http://localhost:8080/" --data-urlencode "param1=value1" --data-urlencode "param2=value2"

Comment From: livk-cloud

You should debug this class: org.springframework.web.method.annotation.RequestParamMapMethodArgumentResolver

Comment From: sdeleuze

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.