Questions tagged [form-parameter]

34 questions
7
votes
1 answer

How to retrieve FORM/POST Parameters in Spring Controller?

I have the following response that should come from a MailChimp webhook URL. This is the row BODY: RAW BODY …
WowBow
  • 7,137
  • 17
  • 65
  • 103
6
votes
2 answers

REST services - testing PUT methods in the browser

I've developed REST services. I can test the GET methods by the browser, or by a Client Application. But those who have PUT methods I don't know how to consume them by the browser... For example, I have this method that turns a lamp on, after I…
user2144555
  • 1,315
  • 11
  • 34
  • 55
4
votes
1 answer

List of string as form param

I have a method that uses a FormParam parameter anotation and the parameter itself is a collection of String, Like this: public void sendEmail( @FormParam("recipients") List recipients, ... The data I send is like…
user3719857
  • 1,083
  • 4
  • 16
  • 45
4
votes
1 answer

HTTP 400 error in REST web service during POST with FormParam containing own objects (e.g. enities)

For an ordering process in my REST service I have to send a list of "articles" from client to server. These article objects are of a self-made entity type. I already found out that sending a list of STRING or INTEGER objects does work, sending it…
Jana
  • 266
  • 3
  • 5
  • 18
3
votes
3 answers

How to check for required form parameter using JAX-RS?

I have a POST method call which accepts few form parameters. I want JAX-RS to handle the situation where a particular form parameter is not present. Example : @POST @Produces (MediaType.APPLICATION_JSON) public Response…
bharath
  • 49
  • 1
  • 7
2
votes
3 answers

RESTlet appears to be doubly decoding my form parameters

I have a RESTlet application embedded in a Tomcat server and clients are complaining that % symbols in @FormParm parameters are doubly decoded in the RESTlet framework causing a server error 500. My questions are: Do the clients need to doubly…
Jim
  • 1,161
  • 9
  • 21
2
votes
1 answer

How to read form parameters with helidon-se

What is the right way to read form parameters in helidon-se. I have tried doing the following without success. Add DefaultMediaSupport.formParamReader() to the webserver: WebServer.builder() .addReader(...) // added here .build() Then reading…
Harry nc-d
  • 61
  • 4
2
votes
1 answer

@FormParam parameter always null in my JAX-RS resource service

Here is a service that I request with a curl : time curl -i -XPOST 'http://localhost:9080/my/service' -H "Authorization:OAuth MyToken" -H "Content-Type: application/json" -d "ids=516816b2e4b039526a235e2f,516816b2e4b039526a235e2f" The resource…
pauline
  • 87
  • 1
  • 8
1
vote
2 answers

How to send image from App Inventor to a java web service that uses FormDataParam

I've created a java web service that uploads an image to a folder. It works fine from a html form, but when i tried to send the image from app inventor using PostFile I get error 1104, which as I read means that either there's a problem with the…
1
vote
1 answer

how to send post with FormParams using Angular2

client: I do post in angular2 like this: doSelectMessagesAttributesUrl2(pushRequest : PushRequest) { console.info("sending post request"); let headers = new Headers({ 'Content-Type': 'application/json'}); return this.http …
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
1
vote
0 answers

Consuming a REST 2 Dimensional String Array

I have a POST in this format: offset:"0" sort[0][field]:"lname" sort[0][direction]:"desc" How do I set up the REST consumer? I have tried this but it only returns a NULL for the sort…
1
vote
1 answer

How do I sneak my message body past Jersey, perhaps using Mule

So I'm using an older version of Mule (3.3.1) and Jersey (1.6) -very new to both and unable to upgrade- and having a similar problem to "null in FormParam with “charset=UTF-8” in Jersey 2.0" in that HTML form data being @POSTed is always null but…
Ross Drew
  • 8,163
  • 2
  • 41
  • 53
1
vote
2 answers

REST @FormParam is null

I have the following being passed from browser to server Status Code:204 No Content Request Method:POST Content-Type:application/x-www-form-urlencoded Form Data json:{"clientName":"PACK","status":"success","message":"successful!"} and in jsp…
Jacob
  • 14,463
  • 65
  • 207
  • 320
1
vote
1 answer

Getting 405 "Method Not Allowed" error using POST with @FormParam (Java web service with Jersey REST)

I know it is not easy to pass something to the REST Server (Resource) which is neither String nor a simple Type. But for a simple ordering process I need to send a list of articles (which shall be ordered) from the client to teh server. I already…
Jana
  • 266
  • 3
  • 5
  • 18
1
vote
1 answer

PUT method with @FormParam

If I have something like: @PUT @Path("/login") @Produces({"application/json", "text/plain"}) @Consumes("application/json") public String login(@FormParam("login") String login, @FormParam("password") String password) throws Exception { String…
user2144555
  • 1,315
  • 11
  • 34
  • 55
1
2 3