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 JSONP pushes the JSON object up onto the Request line so its not really a JSON object which is being sent but instead just name value pairs on the URL.
Is it possible to map the values in my GET request to a POJO? Jersey gives the following exception when i try binding
A HTTP GET method, public void handleJSONP(MyPojo), should not consume any entity.
The binding code is looking in the request body however it doesnt exist because it is a GET request. Is there any other way to bind the values in the request without having to manually include a @QueryParam entry for each ?
Thanks
I was able resolve this by using @com.sun.jersey.api.core.InjectParam of jersey
Then the Pojo looks like this