Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @GET
- @Path("{id}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- public Response getPodcastById(@PathParam("id") Long id, @QueryParam("detailed") boolean detailed)
- throws IOException, AppException {
- Podcast podcastById = podcastService.getPodcastById(id);
- return Response.ok() //200
- .entity(podcastById, detailed ? new Annotation[]{PodcastDetailedView.Factory.get()} : new Annotation[0])
- .header("Access-Control-Allow-Origin", "*")
- .header("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT")
- .allow("OPTIONS").build();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement