2014-12-08 11:25:52 +01:00
|
|
|
POST /greet
|
|
|
|
-----------
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Request Body**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
``` javascript
|
2014-12-20 21:58:07 +01:00
|
|
|
{
|
|
|
|
"msg": "Hello, haskeller!"
|
|
|
|
}
|
2014-12-08 11:25:52 +01:00
|
|
|
```
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Response**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- Status code 201
|
2015-01-04 16:53:02 +01:00
|
|
|
- If you use ?capital=true
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
``` javascript
|
2014-12-20 21:58:07 +01:00
|
|
|
{
|
2015-01-04 16:53:02 +01:00
|
|
|
"msg": "HELLO, HASKELLER"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- If you use ?capital=false
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
{
|
|
|
|
"msg": "Hello, haskeller"
|
2014-12-20 21:58:07 +01:00
|
|
|
}
|
2014-12-08 11:25:52 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
GET /hello/:name
|
|
|
|
----------------
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Captures**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- *name*: name of the person to greet
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**GET Parameters**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- capital
|
|
|
|
- **Values**: *true, false*
|
|
|
|
- **Description**: Get the greeting message in uppercase (true) or not (false). Default is false.
|
|
|
|
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Response**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- Status code 200
|
2015-01-04 16:53:02 +01:00
|
|
|
- If you use ?capital=true
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
``` javascript
|
2014-12-20 21:58:07 +01:00
|
|
|
{
|
2015-01-04 16:53:02 +01:00
|
|
|
"msg": "HELLO, HASKELLER"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- If you use ?capital=false
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
{
|
|
|
|
"msg": "Hello, haskeller"
|
2014-12-20 21:58:07 +01:00
|
|
|
}
|
2014-12-08 11:25:52 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
DELETE /greet/:greetid
|
|
|
|
----------------------
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Captures**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- *greetid*: identifier of the greet msg to remove
|
|
|
|
|
2015-01-04 16:53:02 +01:00
|
|
|
**Response**:
|
2014-12-08 11:25:52 +01:00
|
|
|
|
|
|
|
- Status code 204
|
|
|
|
- No response body
|
2014-12-20 21:58:07 +01:00
|
|
|
|
|
|
|
|