This is my java code:
@POST
@Path(\"/sumPost\")
@Produces(MediaType.TEXT_PLAIN)
public String sumPost(@QueryParam(value = \"x\") int x,
@QueryParam(v
You are missing the data part of the command:
curl --data "param1=value1¶m2=value2" https://example.com/fakesite.php
The -d (or --data) should come before the link. And the "name value pair" should be varName=varValue&otherVar=otherValue
Also, from documentation, the -X command is not correct:
This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. So for example if you want to make a proper HEAD request, using -X HEAD will not suffice. You need to use the -I, --head option.
It should be -X POST
Finally, Remember to use "html encode" to encode your values.