Can we use GET
request with @RequestBody
annotation in Spring mvc or not?
I am not able to understand why it is working with POST
and not GET
. Also in the spring-reference.pdf the use of this annotation is with PUT
.
Can someone please explain can it be used with other RequestMethods
as well and how to use the same.
Probably your client or something at a lower tier in the server is ignoring or stripping it. Adding a body to a GET is technically not forbidden by HTTP, but it's sort of undefined and not universally supported.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.