-
Notifications
You must be signed in to change notification settings - Fork 0
/
request.http
66 lines (50 loc) · 2.39 KB
/
request.http
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
### Create user : Success-code = 201
POST https://projectcoddityserverside.herokuapp.com/auth/register/ HTTP/1.1
content-type: application/json
{
"username":"cy",
"password":"cy"
}
### Get token : Success-code = 200
POST https://projectcoddityserverside.herokuapp.com/auth/token/ HTTP/1.1
content-type: application/json
{
"username":"a",
"password":"a"
}
### Get coordinates : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/get-coordinates/ HTTP/1.1
content-type: application/json
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### garbages-to-validate : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/garbages-to-validate/ HTTP/1.1
content-type: application/json
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### get-garbages-to-throw/ : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/get-garbages-to-throw HTTP/1.1
content-type: application/json
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### List user : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/auth/list HTTP/1.1
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### lsit garbagge
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/list-garbage/ HTTP/1.1
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### add garbage : Success-code = 200
POST https://projectcoddityserverside.herokuapp.com/grabthetrash/add-garbage/ HTTP/1.1
content-type: application/json
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
{
"owner":"1",
"latitude":"45.5",
"longitude":"45.5"
}
### Get coordinates : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/get-coordinates/ HTTP/1.1
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### Set all bin valid : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/set-all-bins-valid/ HTTP/1.1
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66
### Delete all bins : Success-code = 200 (when authentification)
GET https://projectcoddityserverside.herokuapp.com/grabthetrash/delete-all-bin/ HTTP/1.1
Authorization: Token 14599080d352889efb9b672e30f25ff6ba129c66