-
Notifications
You must be signed in to change notification settings - Fork 0
/
request.http
115 lines (89 loc) · 1.86 KB
/
request.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
POST http://localhost:3000/api/users/register
Content-Type: application/json
{
"name": "John",
"email": "johndoe@example.com",
"description": "teste"
}
################
POST http://localhost:3000/api/countries
Content-Type: application/json
{
"name": "Brasil"
}
################
POST http://localhost:3000/api/states
Content-Type: application/json
{
"name": "Santa Catarina",
"country_id": 1
}
################
POST http://localhost:3000/api/categories
Content-Type: application/json
{
"name": "Fantasy"
}
################
POST http://localhost:3000/api/books
Content-Type: application/json
Date: {{$datetime rfc1123}}
{
"title": "Livro2",
"date_publication": "{{$datetime '2021-02-12'}}",
"price": "50",
"isbn": "test-isbn",
"brief": "resumo",
"summary": "resumo",
"pages": "200",
"user_id": 1,
"category_id": 1
}
################
GET http://localhost:3000/api/books
################
GET http://localhost:3000/api/countries
################
GET http://localhost:3000/api/books/1
################
POST http://localhost:3000/api/orders
Content-Type: application/json
{
"discount_id": 1,
"name": "teste",
"total": 150,
"middle_name": "name",
"email": "elvinciqueira@gmail.com",
"cpf_cnpj": "11111111111",
"country_id": 1,
"cellphone": "11111111",
"state": "São Paulo",
"address": "Estrada de baixo",
"city": "Diadema",
"complement": "Eucaliptos",
"cep": "09980400",
"order": {
"itens": [
{
"idBook": 1,
"quantity": 1
},
{
"idBook": 2,
"quantity": 2
}
]
}
}
################
GET http://localhost:3000/api/orders/3
Content-Type: application/json
################
POST http://localhost:3000/api/order/discount
Content-Type: application/json
Date: {{$datetime rfc1123}}
{
"code": "code-123",
"percentage": 20,
"expiration": "{{$datetime '2021-02-12'}}"
}