git.iko.soy/typeable/servant
on master help sign in
Update example output
commit4e5e0a5324de0af279ce2ef9825b3a9e206a9b86 authorRobert Soeldner <r.soeldner@gmail.com> dateSat 29 Sep 2018, 17:50 (8 years ago) parenta2f8c2c
1 file changed+28−31
servant-docs/example/greet.md+28−31
servant-docs/example/greet.md+28−31
@@ -10,34 +10,42 @@ You'll also note that multiple intros are possible.
1010
1111## POST /greet
1212
13−#### Request:
13+### Request:
1414
1515- Supported content types are:
1616
17+ - `application/json;charset=utf-8`
1718 - `application/json`
1819
19−- Example: `application/json`
20+- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
2021
2122```javascript
2223"HELLO, HASKELLER"
2324```
2425
25−#### Response:
26+- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
2627
27−- Status code 201
28+```javascript
29+"Hello, haskeller"
30+```
31+
32+### Response:
33+
34+- Status code 200
2835- Headers: [("X-Example","1729")]
2936
3037- Supported content types are:
3138
39+ - `application/json;charset=utf-8`
3240 - `application/json`
3341
34−- If you use ?capital=true
42+- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
3543
3644```javascript
3745"HELLO, HASKELLER"
3846```
3947
40−- If you use ?capital=false
48+- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
4149
4250```javascript
4351"Hello, haskeller"
@@ -45,81 +53,70 @@ You'll also note that multiple intros are possible.
4553
4654## DELETE /greet/:greetid
4755
48−#### Title
56+### Title
4957
5058This is some text
5159
52−#### Second secton
60+### Second secton
5361
5462And some more
5563
56−#### Captures:
64+### Captures:
5765
5866- *greetid*: identifier of the greet msg to remove
5967
68+### Headers:
6069
6170- This endpoint is sensitive to the value of the **unicorns** HTTP header.
6271
63−#### Response:
72+### Response:
6473
6574- Status code 200
6675- Headers: []
6776
6877- Supported content types are:
6978
79+ - `application/json;charset=utf-8`
7080 - `application/json`
7181
72−- Response body as below.
82+- Example (`application/json;charset=utf-8`, `application/json`):
7383
7484```javascript
75−[]
85+
7686```
7787
7888## GET /hello/:name
7989
80−#### Captures:
90+### Captures:
8191
8292- *name*: name of the person to greet
8393
84−#### GET Parameters:
94+### GET Parameters:
8595
8696- capital
8797 - **Values**: *true, false*
8898 - **Description**: Get the greeting message in uppercase (true) or not (false).Default is false.
8999
90100
91−#### Response:
101+### Response:
92102
93103- Status code 200
94104- Headers: []
95105
96106- Supported content types are:
97107
108+ - `application/json;charset=utf-8`
98109 - `application/json`
99110 - `text/plain;charset=utf-8`
100111
101−- If you use ?capital=true
112+- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`, `text/plain;charset=utf-8`):
102113
103114```javascript
104115"HELLO, HASKELLER"
105116```
106117
107−- If you use ?capital=true
108−
109−```
110−"HELLO, HASKELLER"
111−```
112−
113−- If you use ?capital=false
118+- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
114119
115120```javascript
116121"Hello, haskeller"
117122```
118−
119−- If you use ?capital=false
120−
121−```
122−"Hello, haskeller"
123−```
124−
125−