-
Notifications
You must be signed in to change notification settings - Fork 3
/
http_client.http
120 lines (94 loc) · 2.15 KB
/
http_client.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
## CreateUser
POST http://localhost:8080/user HTTP/1.1
content-type: application/json
{
"name": "John Doe",
"email": "[email protected]",
"password": "12345678@",
"cep": "01153000"
}
###
## UpdateUser
PATCH http://localhost:8080/user HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"name": "John Doe",
"email": "[email protected]",
"cep": "88132243"
}
###
## GetUserByID
GET http://localhost:8080/user HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
###
## DeleteUser
DELETE http://localhost:8080/user HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
####
## FindManyUsers
GET http://localhost:8080/user/list-all HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
###
## UpdateUserPassword
PATCH http://localhost:8080/user/password HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"password": "123456789@",
"old_password": "12345678@"
}
###
## Login
# @name login
POST http://localhost:8080/auth/login HTTP/1.1
content-type: application/json
{
"email": "[email protected]",
"password": "12345678@"
}
###
@token = {{login.response.body.access_token}}
### Categories
## CreateCategory
POST http://localhost:8080/category HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"title": "Samsung"
}
### Products
## CreateProduct
POST http://localhost:8080/product HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"title": "Samsung",
"description": "wewewe",
"categories": [],
"price": 39900
}
###
## UpdateProduct
PATCH http://localhost:8080/product/37545729-e891-40b5-946c-8e7d55bd686b HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"categories": ["07145e70-2a8e-4f71-9165-f0d450afa524"]
}
###
## DeleteProduct
DELETE http://localhost:8080/product/f720e1ce-cb88-4f72-a765-0250c1a525e3 HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
###
## FindManyProducts
GET http://localhost:8080/product HTTP/1.1
content-type: application/json
Authorization: Bearer {{token}}
{
"categories": ["ee78a1ab-c441-4c67-8b62-74fa16797ace"]
}