In following method:
@GET
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN})
@Path("{id}")
public String getMessage(@PathParam("username") String username,
@PathParam("id") int id,
@QueryParam("format") String format) {
return "test";
}
how do I return the the data in the specific format determined by the format query parameter.