Jersey POST Method is receiving null values as parameters

后端 未结 4 1166
情话喂你
情话喂你 2020-12-09 05:18

I am developing RESTful services with Jersey and it works great with GET methods. However I can\'t make it work with POST methods and JSON or text parameters. These is what

4条回答
  •  长情又很酷
    2020-12-09 05:39

    I just started developing webservice in java and had a same problem with POST data. I got very simple solution to read the POST data using @FormParam, Actually i was using the @QueryParam to read POST data, I think its only for reading the QueryString data using GET method

    A very nice documentation given here. Having read this article, most of my confusions were cleared. http://docs.jboss.org/resteasy/docs/2.0.0.GA/userguide/html_single/index.html

    Tip: Just make sure you are using "application/x-www-form-urlencoded" mime type while using @FormParam

提交回复
热议问题