on f11d520 help sign in
servant/example/greet.md
124 lines 1.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`
19- Example: `application/json`
21```javascript
22"Hello, haskeller!"
23```
25#### Response:
27- Status code 201
29- Supported content types are:
31 - `application/json`
33- If you use ?capital=true
35```javascript
36"HELLO, HASKELLER"
37```
39- If you use ?capital=false
41```javascript
42"Hello, haskeller"
43```
45## GET /hello;lang=<value>/:name
47#### Captures:
49- *name*: name of the person to greet
51#### Matrix Parameters:
53**hello**:
55- lang
56 - **Values**: *en, sv, fr*
57 - **Description**: Get the greeting message selected language. Default is en.
61#### GET Parameters:
63- capital
64 - **Values**: *true, false*
65 - **Description**: Get the greeting message in uppercase (true) or not (false).Default is false.
68#### Response:
70- Status code 200
72- Supported content types are:
74 - `application/json`
75 - `text/plain;charset=utf-8`
77- If you use ?capital=true
79```javascript
80"HELLO, HASKELLER"
81```
83- If you use ?capital=true
85```
86"HELLO, HASKELLER"
87```
89- If you use ?capital=false
91```javascript
92"Hello, haskeller"
93```
95- If you use ?capital=false
97```
98"Hello, haskeller"
99```
101## DELETE /greet/:greetid
103#### Title
105This is some text
107#### Second secton
109And some more
111#### Captures:
113- *greetid*: identifier of the greet msg to remove
116- This endpoint is sensitive to the value of the **unicorns** HTTP header.
118#### Response:
120- Status code 200
122- No response body