-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapi.http
61 lines (42 loc) · 990 Bytes
/
api.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
###
# @name admin_jwt_login
POST http://localhost:3000/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "secret"
}
###
@jwt = {{ admin_jwt_login.response.body.access_token }}
###
POST http://localhost:3000/prefixo
###
GET http://localhost:3000/admin/products
Authorization: Bearer {{ jwt }}
###
# @name createProduct
POST http://localhost:3000/admin/products
Content-Type: application/json
Authorization: Bearer jwt
{
"name": "Product 1",
"slug": "product-14444",
"description": "Product 1 description",
"price": 9.99
}
###
@productId = {{ createProduct.response.body.id }}
###
GET http://localhost:3000/admin/products/1
###
PATCH http://localhost:3000/admin/products/cm493nlnm0000s9ecqhw6wqah
Content-Type: application/json
{
"slug": "product-xpto"
}
###
DELETE http://localhost:3000/admin/products/{{productId}}
### open products
GET http://localhost:3000/products?page=1
###
GET http://localhost:3000/products/product-12