Building Webservices with Java EE 8 - Packt Publishing Video Course Section 3
In this video we are going to talk about Content-Types and Content Negotiation.
Method | URI | Status | Description |
---|---|---|---|
GET | /api/version | 200 | Get version string based on header |
GET | /api/documents/magic.gif | 200 | Get and display GIF |
GET | /api/documents/me.jpg | 200 | Get and download JPEG |
In this video we are showing how to use JSON-B for easy data binding.
Method | URI | Status | Description |
---|---|---|---|
GET | /api/json-b/ | 200 | Marshall JSON-B annotated POJO |
POST | /api/json-b/ | 204 | Unmarshall and update JSON-B annotated POJO |
GET | /api/json-b/custom | 200 | Marshall custom POJO using Jsonb |
POST | /api/json-b/custom | 204 | Unmarshall custom POJO using Jsonb |
In this video we are showing how to use JSON-P for flexible JSON processing.
Method | URI | Status | Description |
---|---|---|---|
GET | /api/json-p/ | 200 | Marshall a JsonArray of JsonObject using JSON-P |
POST | /api/json-p/ | 204 | Unmarshall and Update a JsonArray of JsonObject using JSON-P |
PATCH | /api/json-p/ | 204 | Patch a JsonArray of JsonObject using JSON-P Pointer |
In this video we are showing how to build hypermedia-driven REST APIs.
Method | URI | Status | Description |
---|---|---|---|
GET | /api/hateos/books | 200 | Get a list of books |
GET | /api/hateos/books?authorId={authorId} | 200 | Get a list of books for given authorId |
GET | /api/hateos/books/{isbn} | 200 | Get a book by ISBN |
GET | /api/hateos/author | 200 | Get a list of authors |
GET | /api/hateos/author/{id} | 200 | Get an author by ID |
$ mvn clean verify
$ docker build -t content-service:1.0 .
$ docker run -it -p 8080:8080 content-service:1.0