I am developing a server side application (not client). I have a list operation where I am using @GET
and I am passing the parameters as @QueryParam
. Should I use @FormParam
? Will it be helpful while developing the client?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The @FormParam
annotation will expect the parameter to be in the body of the request as sent by an HTML form
submit.
An HTTP GET should not use a request body. So, keep using @QueryParam
for @GET
.
See also:
- HTTP GET with request body