Today when I am going though Jersey documentation I came across the following statement
Unlike method parameters that are associated with the extraction of request parameters,
the method parameter associated with the representation being consumed does not require
annotating. A maximum of one such unannotated method parameter may exist since there
may only be a maximum of one such representation sent in a request.
I am new to JAX-RS hence not very clear with the way we send such a parameter in a request (I don't find any concrete example to understand better)
From the above statement what i understand is, we could have a resource method some think like
@Path("restful")
public class MyResource{
...
@GET
@Produces("application/text")
public String getStringResp(String param){
...
return "some value";
}
....
}
Here we are not using any annotated parameter like path, matrix, query or any other params.
Now my question is, at client side how could we send a value to the method parameter "param"? We could use the api methods like queryparam() etc., on "webtarget" or "invocationBuilder" to send a request param if the param is annotated repectively. Here it is not the case.
Please help me out in understanding this?
Thanks in advance