-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.http
67 lines (55 loc) · 1.24 KB
/
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
@baseURL = http://localhost:3333
@token = {{authenticateCustomer.response.body.accessToken}}
@expenseId = {{createExpense.response.body.expense.id}}
###
# @name registerCustomer
POST {{baseURL}}/customers
Content-Type: application/json
{
"name": "Luiz Matos",
"email": "luizsmatos@on-despezzas.com",
"password": "123456"
}
###
# @name authenticateCustomer
POST {{baseURL}}/customers/login
Content-Type: application/json
{
"email": "luizsmatos@on-despezzas.com",
"password": "123456"
}
###
# @name createExpense
POST {{baseURL}}/expenses
Authorization: Bearer {{token}}
Content-Type: application/json
{
"description": "Almoço",
"amount": 20.00,
"date": "2024/01/01"
}
###
# @name listExpenses
GET {{baseURL}}/expenses?page=1
Authorization: Bearer {{token}}
Content-Type: application/json
###
# @name getExpense
GET {{baseURL}}/expenses/{{expenseId}}
Authorization: Bearer {{token}}
Content-Type: application/json
###
# @name editExpense
PUT {{baseURL}}/expenses/{{expenseId}}
Authorization: Bearer {{token}}
Content-Type: application/json
{
"description": "Jantar",
"amount": 30.00,
"date": "2024/01/01"
}
###
# @name deleteExpense
DELETE {{baseURL}}/expenses/{{expenseId}}
Authorization: Bearer {{token}}
Content-Type: application/json