-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests.http
113 lines (91 loc) · 4.16 KB
/
requests.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
###
POST http://localhost:5000/api/auth/register/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
{
"username" : "admin",
"email": "[email protected]",
"password" : "123123",
"isAdmin": "true"
}
###
POST http://localhost:5000/api/auth/login/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
{
"username" : "admin",
"password" : "123123"
}
###
POST http://localhost:5000/api/auth/refresh/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
{
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2M4ZGU4ZjJlOGZlNjAzMGNhYmM5ZCIsImlzQWRtaW4iOmZhbHNlLCJpYXQiOjE2NTc2MzU5NTR9.2gOmoYNO0deb_6BTzEl_MQ-pE61wVFa9dKK9QVTzTt8"
}
###
POST http://localhost:5000/api/auth/logout/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2M4ZGU4ZjJlOGZlNjAzMGNhYmM5ZCIsImlzQWRtaW4iOmZhbHNlLCJpYXQiOjE2NTc2Mzc1MDIsImV4cCI6MTY1NzYzOTMwMn0.qOLjQOKtgWvcmupGEGefOE9Nlt-swrwYpUFnHPmJlGE
{
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2M4ZGU4ZjJlOGZlNjAzMGNhYmM5ZCIsImlzQWRtaW4iOmZhbHNlLCJpYXQiOjE2NTc2Mzc1MDJ9.3TXI43pvlCjWapQ65me0WTsLKp2hSxrKgNAASK5hAL0"
}
###Update User
PUT http://localhost:5000/api/users/:id
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNjU3NTU4NzE0LCJleHAiOjE2NTc1NTg3NDR9.PTdntlhEUlcaAumVeAbT2FbgPUCDQXmQgEZJ4VReG4Q
{
}
###Delete User
DELETE http://localhost:5000/api/users/:id
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNjU3NTU4NzE0LCJleHAiOjE2NTc1NTg3NDR9.PTdntlhEUlcaAumVeAbT2FbgPUCDQXmQgEZJ4VReG4Q
###GEt all User
GET http://localhost:5000/api/users/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2Q4ZjQ3NjcxNmIxMzUxODk4MGQwYiIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1NzYzODk0NCwiZXhwIjoxNjU3NjQwNzQ0fQ.2IHpZ-v-njQPRDci4R6ymkNer0aiGMgfApILbE3cWgI
###Create a Note
POST http://localhost:5000/api/notes/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2Q4ZjQ3NjcxNmIxMzUxODk4MGQwYiIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1NzY0MTA5OCwiZXhwIjoxNjU3NjQyODk4fQ.lYFQhgWEj66PkN2eyvD2gMF3Pi5n6SxvqMxvwKrcEF4
{
"title" : "Demo NOte 43",
"color" : "green",
"userId" : "62cc8dbdf2e8fe6030cabc9b",
"list" : [
"Demo NOte 1",
"Demo NOte 2",
"Demo NOte 3"
]
}
###delete a Note
DELETE http://localhost:5000/api/notes/62cd9590b4b78b54696f2add
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2Q4ZjQ3NjcxNmIxMzUxODk4MGQwYiIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1NzY0MjYwNCwiZXhwIjoxNjU3NjQ0NDA0fQ.cdPCGyf0ppyLoLAXP3YvjJu2BZSbWq6smQQb9kJgw0c
###get a Note
GET http://localhost:5000/api/notes/find/62cd9590b4b78b54696f2add
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2Q4ZjQ3NjcxNmIxMzUxODk4MGQwYiIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1NzY0MjYwNCwiZXhwIjoxNjU3NjQ0NDA0fQ.cdPCGyf0ppyLoLAXP3YvjJu2BZSbWq6smQQb9kJgw0c
###Create all Note
GET http://localhost:5000/api/notes/
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyY2Q4ZjQ3NjcxNmIxMzUxODk4MGQwYiIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1NzY0MjYwNCwiZXhwIjoxNjU3NjQ0NDA0fQ.cdPCGyf0ppyLoLAXP3YvjJu2BZSbWq6smQQb9kJgw0c