generated from lui7henrique/boilerplate-node-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.http
71 lines (55 loc) · 1.31 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
68
69
70
@baseUrl = http://localhost:3333
@token = {{authenticate_org.response.body.token}}
# @name create_org
POST {{baseUrl}}/orgs
Content-Type: application/json
{
"name": "Animal Rescue Org",
"responsible_name": "Maria Silva",
"email": "[email protected]",
"postal_code": "98765-432",
"address": "456 Rescue Road",
"neighborhood": "Animal Care Neighborhood",
"number": "200",
"city": "Curitiba",
"state": "PR",
"whatsapp_number": "+5541988888888",
"password": "AdoptionPass123"
}
###
# @name authenticate_org
POST {{baseUrl}}/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "AdoptionPass123"
}
###
# @name get_profile_org
GET {{baseUrl}}/profile
Content-Type: application/json
Authorization: Bearer {{token}}
###
# @name register_pet
POST {{baseUrl}}/pets
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Lucky",
"description": "A friendly dog looking for a loving home.",
"age": 3,
"size": "MEDIUM",
"energy_level": "HIGH",
"independency_level": "LOW",
"ambient": "MEDIUM",
"type": "DOG"
}
###
# @name search_pets
GET {{baseUrl}}/pets?city=Curitiba&page=1
Content-Type: application/json
###
# @name show_pet
GET {{baseUrl}}/pets/{{search_pets.response.body.pets[0].id}}
Content-Type: application/json
###