Resources
Greeting REST Service
The Greeting provides the entry point into the service.
Accessing the greeting GET with provided content
Request structure
GET /greeting?name=Everybody HTTP/1.1
Accept: application/json
Host: localhost
Request parameters
Parameter | Description |
---|---|
|
Greeting’s target |
Response fields
Path | Type | Description |
---|---|---|
|
|
Greeting’s generated id |
|
|
Greeting’s content |
|
|
Greeting’s optional content |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 23 Jun 2016 03:49:27 GMT
Content-Length: 38
{"id":1,"content":"Hello, Everybody!"}
CURL request
$ curl 'http://localhost:8080/greeting?name=Everybody' -i -H 'Accept: application/json'
Accessing the greeting GET with default content
Request structure
GET /greeting HTTP/1.1
Accept: application/json
Host: localhost
Response fields
Path | Type | Description |
---|---|---|
|
|
When name is not provided, this field contains the default value |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 23 Jun 2016 03:49:27 GMT
Content-Length: 34
{"id":1,"content":"Hello, World!"}
CURL request
$ curl 'http://localhost:8080/greeting' -i -H 'Accept: application/json'