aboutsummaryrefslogtreecommitdiff
path: root/example/lazybones-test-docs.md
blob: 12effa86cad8076dd1058b9bd8d4c5b5eda4353c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Lazybones Demo App - v0.0.0

Just an API that defines some endpoints. These
  endpoints aren't meant to accomplish anything. merely to test out
  the lazybones HTTP routing framework.

## Endpoints

### POST /hello/:who:
*text/plain*

Route Variables: 

- WHO

Authorization Required: 

> Request is authorized if it contains the right TESTAPPSESSION
>   cookie. Obtain such a cookie by posting to the /login endpoint.

Post something to hello who

### GET /hello/:who:
*text/plain*

Route Variables: 

- WHO

Just says hello to WHO

### POST /login
*text/plain*

Dummy login endpoint for returning a session cookie. Always returns
  the "true" and sends a set-cookie header, setting 'testappsession'
  to 'coolsessionbro'.

### GET /person/:person:
*application/json*

Route Variables: 

- PERSON: A Person Instance

Returns a json representation of the person.

### POST /search
*text/plain*

Authorization Required: 

> Randomly decides that the request is authorized

Echo the search parameters in a nice list, but also has a post-body

### GET /search
*text/plain*

Echo the search parameters in a nice list.

### GET /search/:category:
*text/plain*

Route Variables: 

- CATEGORY: An Integer

Echo the search back, but in a specific category