Skip to content

Instantly share code, notes, and snippets.

@abdulbasitkay
Last active May 4, 2017 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdulbasitkay/c747347374b14141e9cc286ef91c3915 to your computer and use it in GitHub Desktop.
Save abdulbasitkay/c747347374b14141e9cc286ef91c3915 to your computer and use it in GitHub Desktop.
Question Resource without error handling
@Path("questions/")
public class QuestionResource {
@GET
@Path("{id}")
@Produces("application/json")
Response getQuestion(@PathParam("id") String questionId) {
QuestionDto question = questionService.getQuestionById(questionId);
return Response.status(OK).entity(question).build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment