-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.http
More file actions
82 lines (54 loc) · 1.78 KB
/
requests.http
File metadata and controls
82 lines (54 loc) · 1.78 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
@contentType = application/json
@pavelBearer = Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjkzOTgyNDA4LCJqdGkiOiJhNjRiM2FkYjAwYmI0MDJkYWI5NTEyYjlkYTkxNzY1OSIsInVzZXJfaWQiOjF9.BUa4lBL68Q5mJbF-Qn-HcKc6aIUl4huSlj8iDyTrOk8
@adminBearer = Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk0MTY4MzM3LCJqdGkiOiI1YWRlNzk5MzQzNGY0YmUyODY3NjQ3ZjM1YzExZjU0OSIsInVzZXJfaWQiOjR9.ioRXM9LLn0huVqzYVGg4QdizBtnm0Lh0YiFi_aWlI2U
### anonim get /posts/
GET http://127.0.0.1:8000/api/v1/posts/
### pavel get /posts/
GET http://127.0.0.1:8000/api/v1/posts/
Authorization: {{pavelBearer}}
### admin get /posts/
GET http://127.0.0.1:8000/api/v1/posts/?limit=1
Authorization: {{adminBearer}}
### pavel post /posts/
POST http://127.0.0.1:8000/api/v1/posts/
Authorization: {{pavelBearer}}
Content-Type: {{contentType}}
{
"text": "text text text"
}
### anonim get /follow/
GET http://127.0.0.1:8000/api/v1/follow/
### pavel get /follow/
GET http://127.0.0.1:8000/api/v1/follow/
Authorization: {{pavelBearer}}
### pavel get /follow/?search=...
GET http://127.0.0.1:8000/api/v1/follow/?search=1
Authorization: {{pavelBearer}}
### pavel post /follow/
POST http://127.0.0.1:8000/api/v1/follow/
Authorization: {{pavelBearer}}
Content-Type: {{contentType}}
{
"following": "pavel"
}
### admin post /follow/
POST http://127.0.0.1:8000/api/v1/follow/
Authorization: {{adminBearer}}
Content-Type: {{contentType}}
{
"following": "pavel"
}
### create user
POST http://127.0.0.1:8000/api/v1/users/
Content-Type: {{contentType}}
{
"username": "pavel",
"password": "qwerty555"
}
### get token for user
POST http://127.0.0.1:8000/api/v1/jwt/create/
Content-Type: {{contentType}}
{
"username": "admin",
"password": "qwerty555"
}