Update example output
This commit is contained in:
parent
a2f8c2c9b4
commit
4e5e0a5324
1 changed files with 28 additions and 31 deletions
|
@ -10,34 +10,42 @@ You'll also note that multiple intros are possible.
|
||||||
|
|
||||||
## POST /greet
|
## POST /greet
|
||||||
|
|
||||||
#### Request:
|
### Request:
|
||||||
|
|
||||||
- Supported content types are:
|
- Supported content types are:
|
||||||
|
|
||||||
|
- `application/json;charset=utf-8`
|
||||||
- `application/json`
|
- `application/json`
|
||||||
|
|
||||||
- Example: `application/json`
|
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
"HELLO, HASKELLER"
|
"HELLO, HASKELLER"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Response:
|
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
- Status code 201
|
```javascript
|
||||||
|
"Hello, haskeller"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
- Status code 200
|
||||||
- Headers: [("X-Example","1729")]
|
- Headers: [("X-Example","1729")]
|
||||||
|
|
||||||
- Supported content types are:
|
- Supported content types are:
|
||||||
|
|
||||||
|
- `application/json;charset=utf-8`
|
||||||
- `application/json`
|
- `application/json`
|
||||||
|
|
||||||
- If you use ?capital=true
|
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
"HELLO, HASKELLER"
|
"HELLO, HASKELLER"
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you use ?capital=false
|
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
"Hello, haskeller"
|
"Hello, haskeller"
|
||||||
|
@ -45,81 +53,70 @@ You'll also note that multiple intros are possible.
|
||||||
|
|
||||||
## DELETE /greet/:greetid
|
## DELETE /greet/:greetid
|
||||||
|
|
||||||
#### Title
|
### Title
|
||||||
|
|
||||||
This is some text
|
This is some text
|
||||||
|
|
||||||
#### Second secton
|
### Second secton
|
||||||
|
|
||||||
And some more
|
And some more
|
||||||
|
|
||||||
#### Captures:
|
### Captures:
|
||||||
|
|
||||||
- *greetid*: identifier of the greet msg to remove
|
- *greetid*: identifier of the greet msg to remove
|
||||||
|
|
||||||
|
### Headers:
|
||||||
|
|
||||||
- This endpoint is sensitive to the value of the **unicorns** HTTP header.
|
- This endpoint is sensitive to the value of the **unicorns** HTTP header.
|
||||||
|
|
||||||
#### Response:
|
### Response:
|
||||||
|
|
||||||
- Status code 200
|
- Status code 200
|
||||||
- Headers: []
|
- Headers: []
|
||||||
|
|
||||||
- Supported content types are:
|
- Supported content types are:
|
||||||
|
|
||||||
|
- `application/json;charset=utf-8`
|
||||||
- `application/json`
|
- `application/json`
|
||||||
|
|
||||||
- Response body as below.
|
- Example (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
[]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## GET /hello/:name
|
## GET /hello/:name
|
||||||
|
|
||||||
#### Captures:
|
### Captures:
|
||||||
|
|
||||||
- *name*: name of the person to greet
|
- *name*: name of the person to greet
|
||||||
|
|
||||||
#### GET Parameters:
|
### GET Parameters:
|
||||||
|
|
||||||
- capital
|
- capital
|
||||||
- **Values**: *true, false*
|
- **Values**: *true, false*
|
||||||
- **Description**: Get the greeting message in uppercase (true) or not (false).Default is false.
|
- **Description**: Get the greeting message in uppercase (true) or not (false).Default is false.
|
||||||
|
|
||||||
|
|
||||||
#### Response:
|
### Response:
|
||||||
|
|
||||||
- Status code 200
|
- Status code 200
|
||||||
- Headers: []
|
- Headers: []
|
||||||
|
|
||||||
- Supported content types are:
|
- Supported content types are:
|
||||||
|
|
||||||
|
- `application/json;charset=utf-8`
|
||||||
- `application/json`
|
- `application/json`
|
||||||
- `text/plain;charset=utf-8`
|
- `text/plain;charset=utf-8`
|
||||||
|
|
||||||
- If you use ?capital=true
|
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`, `text/plain;charset=utf-8`):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
"HELLO, HASKELLER"
|
"HELLO, HASKELLER"
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you use ?capital=true
|
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
|
||||||
|
|
||||||
```
|
|
||||||
"HELLO, HASKELLER"
|
|
||||||
```
|
|
||||||
|
|
||||||
- If you use ?capital=false
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
"Hello, haskeller"
|
"Hello, haskeller"
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you use ?capital=false
|
|
||||||
|
|
||||||
```
|
|
||||||
"Hello, haskeller"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue