That's my current REST GET method.
@GET
@Path("/URI/{input1}")
@Produces(MediaType.APPLICATION_JSON)
public List<T> getDetails(@PathParam("input1") String input1) throws ServiceException;
Now I want to add 3 more input parameters. Instead of adding all 4 parameters as pathparams, can I create a POJO object with all 4 input parameters and pass that POJO to GET method like this
@GET
@Path("/URI")
@Produces(MediaType.APPLICATION_JSON)
public List<T> getDetails(InputPojo input) throws ServiceException;
POJO class with input parameters:
class InputPojo {
String input1;
String input2;
String input3;
// Getters and Setters.
}
Or is this against REST GET specification and I cannot use Java POJO object as input parameter?