Last active
August 29, 2015 14:03
-
-
Save maggandalf/3fd4ab1302d2d5f932b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Singleton | |
@Path("bookinfo") | |
public class BookInfoService { | |
@GET | |
@Path("{isbn}") | |
@Produces(MediaType.APPLICATION_JSON) | |
@Consumes(MediaType.APPLICATION_JSON) | |
public JsonObject findBookByISBN(@PathParam("isbn") String isbn) { | |
return Json.createObjectBuilder() | |
.add("author", "George R.R. Martin") | |
.add("isbn", "1111") | |
.add("title", "A Game Of Thrones").build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment