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!
I think I have found the issue...it should be like this:
Name(@PathParam("name") String name, @PathParam("status") String status )
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With