-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests.http
168 lines (120 loc) · 3.2 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
GET http://127.0.0.1:5000/auth/ HTTP/1.1
###
GET http://127.0.0.1:3000/auth/ HTTP/1.1
###
POST http://127.0.0.1:3000/auth/register HTTP/1.1
Content-Type: application/json
{
"username": "ankit",
"email": "ankitkujat066@gmail.com",
"password": "123@abcDEF",
"confirmPassword": "123@abcDEF"
}
###
POST http://127.0.0.1:5000/auth/login HTTP/1.1
Content-Type: application/json
{
"email": "ankitkujat066@gmail.com",
"password": "123@abcDEF"
}
###
DELETE http://127.0.0.1:3000/auth/logout HTTP/1.1
###
POST http://127.0.0.1:3000/auth/update-pass HTTP/1.1
Content-Type: application/json
{
"oldPassword": "123@abcDEF",
"password": "123@abcDEF",
"confirmPassword": "123@abcDEF"
}
###
POST http://127.0.0.1:5000/auth/forget-pass HTTP/1.1
Content-Type: application/json
{
"email": "ankitkumarjat066@gmail.com"
}
###
POST http://127.0.0.1:3000/auth/reset-pass HTTP/1.1
Content-Type: application/json
{
"tokenId":"609a191aa7106b5748a31386",
"resetPasswordToken": "4480cb061dee70eb3c2cb85a5cb879767d69b6724568c909d2bdc133a3de855d",
"password": "123@abcDEF",
"confirmPassword": "123@abcDEF"
}
###
GET http://127.0.0.1:5000/users/username/ankit HTTP/1.1
###
POST http://127.0.0.1:3000/users/update-avatar HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="1.png"
Content-Type: image/png
< ./1.png
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###
POST http://127.0.0.1:3000/users/update-profile HTTP/1.1
Content-Type: application/json
{
"name": "ankit kumar jat",
"bio": "web developer",
"website": "https://ankitkumarjat.me",
"location": "jaipur, rajasthan, india"
}
###
GET http://127.0.0.1:3000/users/avatar HTTP/1.1
Content-Type: application/json
{
"userId": "60a4d8617a7b363d64eb2b4c"
}
###
POST http://127.0.0.1:3000/posts/create HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="1.png"
Content-Type: image/png
< ./1.png
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="postText";
this is first post
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###
GET http://127.0.0.1:3000/posts/byid?postId=60a64df12c201f3114ef1025
###
GET http://127.0.0.1:3000/posts/ankit
####
POST http://127.0.0.1:3000/posts/like
Content-Type: application/json
{
"postId":"60a64df12c201f3114ef1025"
}
####
POST http://127.0.0.1:5000/posts/comment
Content-Type: application/json
{
"postId":"60ade86e9c40e76f60970b41",
"value": "this is 4nd comment"
}
###
DELETE http://127.0.0.1:3000/posts/comment
Content-Type: application/json
{
"postId":"60a64df12c201f3114ef1025",
"commentId": "60a652dd762cdd31b8078a89"
}
###
GET http://127.0.0.1:3000/posts/comment
Content-Type: application/json
{
"postId":"60a64df12c201f3114ef1025"
}
###
GET http://127.0.0.1:5000/posts/?page=1&limit=1
###
POST http://127.0.0.1:5000/users/follow HTTP/1.1
Content-Type: application/json
{
"userId": "60a4d7fd7a7b363d64eb2b4b"
}
###
GET http://127.0.0.1:5000/users/follow?userId=60a4d7fd7a7b363d64eb2b4b