I'm making tests with a REST service and I need to get a HttpServletResponse
object from it.
When I call the function like this:
http://localhost:8080/wsService/api/servicetest/testify
The HttpServletResponse
that I get is always null
@Path("/testify")
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response Testify(HttpServletResponse response) throws Exception {
try {
return Utilities.getSvc(true, "OK");
} catch (Exception e) {
return Utilities.getSvc(false, "ERROR");
}
}
Is there something I'm missing?