-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
55 lines (41 loc) · 807 Bytes
/
test.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
@base_url = http://localhost:5050
###
# Tests the server is live.
#
GET {{base_url}}/api/is-alive
###
#
# Retreives an non-existing asset.
# Should return a 404 status code.
#
GET {{base_url}}/api/person?id=627b0c040a597ed870c38a2e
###
#
# Get a person that does exist (the person is in the database fixture).
#
GET {{base_url}}/api/person?id=627f3bdce279db4e5c0b3407
###
# @name add_person
#
# Adds an new person.
#
POST {{base_url}}/api/person
content-type: application/json
{
"Name": "Jones",
"Sex": "M",
"Age": 28,
"Height (in)": 68,
"Weight (lbs)": 145
}
###
#
# Gets the person that was just added.
#
@added_person_id = {{add_person.response.body.insertedId}}
GET {{base_url}}/api/person?id={{added_person_id}}
###
#
# Gets all people.
#
GET {{base_url}}/api/people