Created
March 2, 2014 17:39
-
-
Save nazartm/9310385 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Consumes({"application/vnd.blog.v1+xml", "application/vnd.blog.v1+json"}) | |
@Produces({"application/vnd.blog.v1+xml", "application/vnd.blog.v1+json"}) | |
public interface BlogRestfulService { | |
@GET | |
@Path("/posts") | |
List<Post> getPosts(); | |
@GET | |
@Path("/post/{id}") | |
Post getPost(@PathParam("id") int id); | |
@POST | |
@Path("/post") | |
Response addPost(Post post); | |
@PUT | |
@Path("/post/{id}") | |
Response updatePost(@PathParam("id") int id, Post post); | |
@DELETE | |
@Path("/post/{id}") | |
Response deletePost(@PathParam("id") int id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment