Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created July 5, 2015 09:38
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 abhirockzz/8ce586cb72ffdc4390ed to your computer and use it in GitHub Desktop.
Save abhirockzz/8ce586cb72ffdc4390ed to your computer and use it in GitHub Desktop.
Sample RESTful resource class to explore OPTIONS support in the JAX-RS specification
@Path("user")
public class UserResource {
@GET
@Path("{id}")
public Response find(@PathParam("id") String id) {
return Response.ok().build();
}
@PUT
public Response create(/*User user*/) {
return Response.ok().build();
}
@DELETE
@Path("{id}")
public Response delete(@PathParam("id") String id) {
return Response.ok().build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment