I have the following GET method, and it fails to send send back the result to the client.
/*@GET here defines, this method will process HTTP GET requests. */
@GET
@Path("/test/{name}/{status}")
@Produces("application/json")
public Response Name(@PathParam("name,status") String name, String status ) throws JSONException {
String total = "100";
.
.
.
String result = "" + jsonObject;
return Response.status(200).entity(result).build();
}
When I run it, I have the message below:
WARNING: A HTTP GET method, public javax.ws.rs.core.Response… throws org.codehaus.jettison.json.JSONException, should not consume any entity.
Does it have to do with the fact that I have two parameters ?
I already checked online but nothing relevant to my situation. Thanks in advance!
Best Solution
I think I have found the issue...it should be like this:
Thanks!