I\'m trying to bind values in a GET request to a POJO.
The values are parameters in a HTTP GET request. I\'m using JSONP to pass the parameters however it looks like JS
As we know GET request cannot consume any entity, we need to pass each parameter as params. To be simple we can do like the below using javax.ws.rs.BeanParam
(We can use the @BeanParam
instead of @InjectParam
public JSONWithPadding doSomething(@BeanParam final MyPojo argPojo)
....
public class MyPojo
{
/** */
@QueryParam("value1")
private String value1;
/** */
@QueryParam("value2")
private String value2;
/** */
@QueryParam("value3")
private List value3;