forked from Laboratoria/burger-queen-api-mock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrequests.http
executable file
·114 lines (98 loc) · 4.23 KB
/
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
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
// LOGIN
POST http://localhost:8080/login HTTP/1.1
content-type: application/json
{
"email": "grace.hopper@systers.xyz",
"password": "123456"
}
// AGREGAR USUARIOS
POST http://localhost:8080/users HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MDIyNTYyOCwiZXhwIjoxNjkwMjI5MjI4LCJzdWIiOiIyIn0.sz3lGlK55drtPU-x4air0gGQBiMGeRZTibIFOeKUywc
{
"email": "iamawaiter@mail.com",
"password": "123456",
"role": "waiter"
}
POST http://localhost:8080/users HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MDIyNTYyOCwiZXhwIjoxNjkwMjI5MjI4LCJzdWIiOiIyIn0.sz3lGlK55drtPU-x4air0gGQBiMGeRZTibIFOeKUywc
{
"email": "iamachef@mail.com",
"password": "123456",
"role": "chef"
}
// VER USUARIOS
GET http://localhost:8080/users HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MTYxMTA3NywiZXhwIjoxNjkxNjE0Njc3LCJzdWIiOiIyIn0.zQ02_UzwCJOCcMS56rPR26xz1H34vCdiF8e1OqDHf74
// MODIFICAR USUARIO
PATCH http://localhost:8080/users/2 HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MTYyNDc0NiwiZXhwIjoxNjkxNjI4MzQ2LCJzdWIiOiIyIn0.Dcjv_uLYee3dwrEswZdolpKdSaRknVAgtQ6HCGj8xkA
{
"email": "iamacheEEEf@mail.com",
"password": "12343hhh356",
"role": "chef"
}
// VER PRODUCTOS
GET http://localhost:8080/products HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MTYzMTYyMywiZXhwIjoxNjkxNjM1MjIzLCJzdWIiOiIyIn0.Vjl_HA5nlhSr4kiTU5mjKdhC5dpm8OuILcLtn2h4Y-M
// AGREGAR PRODUCTOS
POST http://localhost:8080/products HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY5MTcwMjYxNiwiZXhwIjoxNjkxNzA2MjE2LCJzdWIiOiIyIn0.sCK8TKW6t4mIjbE1r349ROnejkVnbrs7mdwe-w4b2NQ
{
"name": "Palomitas caramelo",
"price": 7000,
"image": "https://alsuper.online/products/413202_p.png",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
}
// VER PEDIDOS Hechos
GET http://localhost:8080/orders HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY4OTg3MDc2MCwiZXhwIjoxNjg5ODc0MzYwLCJzdWIiOiIyIn0.UP7bxjMhD8sHBY_V0LQlKro7yxOH00flVxUyoOfYEXs
// MODIFICAR UNA ORDEN
PATCH http://localhost:8080/orders/2 HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY1MDIzNDAzNSwiZXhwIjoxNjUwMjM3NjM1LCJzdWIiOiIyIn0.q6lDwW_wyK6-8-lUyiLUwnoowRLsvuFblu1yufkaa_Q
{
"status": "delivered",
"dateProcessed": "2022-03-05 16:00"
}
// CREAR UNA ORDEN
POST http://localhost:8080/orders HTTP/1.1
content-type: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYWNlLmhvcHBlckBzeXN0ZXJzLnh5eiIsImlhdCI6MTY2NjEyNTQ5NSwiZXhwIjoxNjY2MTI5MDk1LCJzdWIiOiIyIn0.laNI7HKXIcDzCp1AYl4aMWh5jSlcMFKFQLHrCC2XTPw
{
"client": "Harry Potter",
"table": 1,
"products": [
{
"qty": 1,
"product": {
"id": 1,
"name": "Sandwich de jamón y queso",
"price": 1000,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/sandwich.jpg",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
}
},
{
"qty": 1,
"product": {
"id": 2,
"name": "Café americano",
"price": 500,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/coffe.jpg",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
}
}
],
"status": "pending",
"dataEntry": "2022-03-05 15:00"
}