forked from skypro-backend/example-for-graduate-work
-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-requests.http
73 lines (59 loc) · 1.34 KB
/
example-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
GET http://localhost:8080/ads/1/comments
Content-Type: application/json
Authorization: Basic [email protected] password
###
POST http://localhost:8080/login
Content-Type: application/json
{
"username": "[email protected]",
"password": "password"
}
###
POST http://localhost:8080/register
Content-Type: application/json
{
"username": "[email protected]",
"password": "password",
"firstName": " asdad",
"lastName": " asdad",
"phone": " asdad",
"role": "USER"
}
###
GET http://localhost:8080/ads/me
Content-Type: application/json
Authorization: Basic [email protected] password
###
GET http://localhost:8080/users/me
Content-Type: application/json
Authorization: Basic [email protected] password
###
PATCH http://localhost:8080/users/me
Content-Type: application/json
Authorization: Basic [email protected] password
{
"phone": "33333",
"lastName": "Ivanov",
"firstName": "Ivan"
}
###
GET http://localhost:8080/ads
Content-Type: application/json
Authorization: Basic [email protected] password
###
POST http://localhost:8080/users/set_password
Content-Type: application/json
Authorization: Basic [email protected] password
{
"newPassword": "password",
"currentPassword": "password1"
}
###
POST http://localhost:8080/ads
Content-Type: application/json
Authorization: Basic [email protected] password
{
"price": 123,
"description": "123",
"title": "123"
}