-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.http
45 lines (29 loc) · 770 Bytes
/
.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
@guestId = dummy
@roomId = dummy
### Check In
# @name checkin
POST http://localhost:3000/guests/{{guestId}}/stays/{{roomId}} HTTP/1.1
content-type: application/json
### No body passed
### Capture and parse the Location header
@location = {{checkin.response.headers.Location}}
### Get State
GET http://localhost:3000{{location}} HTTP/1.1
content-type: application/json
### Record Charge
@amount = 10
POST http://localhost:3000{{location}}/charges HTTP/1.1
content-type: application/json
{
"amount": {{amount}}
}
### Record Payment
@amount = 10
POST http://localhost:3000{{location}}/payments HTTP/1.1
content-type: application/json
{
"amount": {{amount}}
}
### Checkout
DELETE http://localhost:3000{{location}} HTTP/1.1
content-type: application/json