-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrequests.http
More file actions
83 lines (56 loc) · 1.33 KB
/
requests.http
File metadata and controls
83 lines (56 loc) · 1.33 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
POST http://127.0.0.1:5000/login
Content-Type: application/json
{
"username": "coder2k",
"password": "secret"
}
> {% client.global.set("jwt", response.body.jwt); %}
###
POST http://127.0.0.1:5000/login
Content-Type: application/json
{
"username": "r00tifant",
"password": "sudo"
}
> {% client.global.set("jwt", response.body.jwt); %}
###
POST http://127.0.0.1:5000/lobbies
Content-Type: application/json
Authorization: Bearer {{jwt}}
{
"name": "coder2k's lobby",
"size": 4
}
> {% client.global.set("lobby_id", response.body.id); %}
###
GET http://127.0.0.1:5000/lobbies
Accept: application/json
###
GET http://127.0.0.1:5000/lobbies/{{lobby_id}}
Accept: application/json
Authorization: Bearer {{jwt}}
###
POST http://127.0.0.1:5000/lobbies/{{lobby_id}}
Content-Type: application/json
Authorization: Bearer {{jwt}}
###
PUT http://127.0.0.1:5000/lobbies/{{lobby_id}}/leave
Content-Type: application/json
Authorization: Bearer {{jwt}}
###
POST http://127.0.0.1:5000/lobbies/{{lobby_id}}/start
Content-Type: application/json
Authorization: Bearer {{jwt}}
###
DELETE http://127.0.0.1:5000/lobbies/{{lobby_id}}
Content-Type: application/json
Authorization: Bearer {{jwt}}
###
POST http://127.0.0.1:5000/register
Content-Type: application/json
{
"username": "r00tifant",
"password": "sudo"
}
###
GET http://127.0.0.1:5000/users