-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.http
51 lines (43 loc) · 1.2 KB
/
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
###
GET http://localhost:3333/category HTTP/1.1
Host: localhost:3333
Content-Type: application/json
###
GET http://localhost:3333/products
####
POST http://localhost:3333/products
Content-Type: application/json
{
"id": "6d652b3a-1e74-4b03-a29c-14095e57029b",
"name": "Product 21",
"description": "Description 21",
"price": 2100,
"image_url": "http://localhost:9000/products/5.png"
}
###
POST http://localhost:3333/auth/login
Content-Type: application/json
{
"username": "john",
"password": "john"
}
###
GET http://localhost:3333/orders
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsInVzZXJuYW1lIjoiam9obiIsImlhdCI6MTcxNjQyODI0NywiZXhwIjoxNzE2NDI4MzA3fQ.M_zEcT1ypfuLHko63fkCorGFjwO9GOGwT80wga2Z5Vo
###
POST http://localhost:3333/orders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsInVzZXJuYW1lIjoiam9obiIsImlhdCI6MTcxNjQyOTA1NywiZXhwIjoxNzE2NDI5MTE3fQ.yGeHxEOMMGCX975z1YBk6JdWskw8KPaY7qZka8rYXNQ
{
"items": [
{
"product_id": "132f7986-dad1-4e83-b826-181dfd2fd800",
"quantity": 1
},
{
"product_id": "cd6cc186-2731-4634-aa36-82a4cc2ea33d",
"quantity": 1
}
],
"card_hash": "123"
}