diff --git a/servant-docs/example/greet.md b/servant-docs/example/greet.md index 67e1a666..322d3c28 100644 --- a/servant-docs/example/greet.md +++ b/servant-docs/example/greet.md @@ -10,34 +10,42 @@ You'll also note that multiple intros are possible. ## POST /greet -#### Request: +### Request: - Supported content types are: + - `application/json;charset=utf-8` - `application/json` -- Example: `application/json` +- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`): ```javascript "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")] - Supported content types are: + - `application/json;charset=utf-8` - `application/json` -- If you use ?capital=true +- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`): ```javascript "HELLO, HASKELLER" ``` -- If you use ?capital=false +- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`): ```javascript "Hello, haskeller" @@ -45,81 +53,70 @@ You'll also note that multiple intros are possible. ## DELETE /greet/:greetid -#### Title +### Title This is some text -#### Second secton +### Second secton And some more -#### Captures: +### Captures: - *greetid*: identifier of the greet msg to remove +### Headers: - This endpoint is sensitive to the value of the **unicorns** HTTP header. -#### Response: +### Response: - Status code 200 - Headers: [] - Supported content types are: + - `application/json;charset=utf-8` - `application/json` -- Response body as below. +- Example (`application/json;charset=utf-8`, `application/json`): ```javascript -[] + ``` ## GET /hello/:name -#### Captures: +### Captures: - *name*: name of the person to greet -#### GET Parameters: +### GET Parameters: - capital - **Values**: *true, false* - **Description**: Get the greeting message in uppercase (true) or not (false).Default is false. -#### Response: +### Response: - Status code 200 - Headers: [] - Supported content types are: + - `application/json;charset=utf-8` - `application/json` - `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 "HELLO, HASKELLER" ``` -- If you use ?capital=true - -``` -"HELLO, HASKELLER" -``` - -- If you use ?capital=false +- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`): ```javascript "Hello, haskeller" ``` - -- If you use ?capital=false - -``` -"Hello, haskeller" -``` - -