on type-errors help sign in
153 lines 2.7 kB history raw
1## On proper introductions.
3Hello there.
5As documentation is usually written for humans, it's often useful to introduce concepts with a few words.
7## This title is below the last
9You'll also note that multiple intros are possible.
11## POST /greet
13### Request:
15- Supported content types are:
17 - `application/json;charset=utf-8`
18 - `application/json`
20- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
22```javascript
23"HELLO, HASKELLER"
24```
26- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
28```javascript
29"Hello, haskeller"
30```
32### Response:
34- Status code 200
35- Headers: [("X-Example","1729")]
37- Supported content types are:
39 - `application/json;charset=utf-8`
40 - `application/json`
42- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
44```javascript
45"HELLO, HASKELLER"
46```
48- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
50```javascript
51"Hello, haskeller"
52```
54### Sample Request:
56```bash
57curl -XPOST \
58 -H "Content-Type: application/json;charset=utf-8" \
59 -d "\"HELLO, HASKELLER\"" \
60 http://localhost:80/greet
61```
63## DELETE /greet/:greetid
65### Title
67This is some text
69### Second section
71And some more
73### Captures:
75- *greetid*: identifier of the greet msg to remove
77### Headers:
79- This endpoint is sensitive to the value of the **X-Num-Unicorns** HTTP header.
81### Response:
83- Status code 200
84- Headers: []
86- Supported content types are:
88 - `application/json;charset=utf-8`
89 - `application/json`
91- Example (`application/json;charset=utf-8`, `application/json`):
93```javascript
95```
97### Sample Request:
99```bash
100curl -XDELETE \
101 -H "X-Num-Unicorns: 1" \
102 http://localhost:80/greet/:greetid
103```
105## GET /hello/:name
107### Captures:
109- *name*: name of the person to greet
111### Headers:
113- This endpoint is sensitive to the value of the **X-Num-Fairies** HTTP header.
115### GET Parameters:
117- capital
118 - **Values**: *true, false*
119 - **Description**: Get the greeting message in uppercase (true) or not (false).Default is false.
122### Response:
124- Status code 200
125- Headers: []
127- Supported content types are:
129 - `application/json;charset=utf-8`
130 - `application/json`
131 - `text/plain;charset=utf-8`
133- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`, `text/plain;charset=utf-8`):
135```javascript
136"HELLO, HASKELLER"
137```
139- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
141```javascript
142"Hello, haskeller"
143```
145### Sample Request:
147```bash
148curl -XGET \
149 -H "X-Num-Fairies: 1729" \
150 http://localhost:80/hello/:name
151```