-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-requests.http
56 lines (47 loc) · 1.17 KB
/
test-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
### Create a workout.
### Status code 201.
POST http://localhost:3000/workouts HTTP/1.1
content-type: application/json
{
"name": "Squat",
"reps": 10,
"weight": 30,
"unit": "lbs",
"date": "01-18-22"
}
### Create another workout.
### Status code 201.
POST http://localhost:3000/workouts HTTP/1.1
content-type: application/json
{
"name": "Deadlift",
"reps": 10,
"weight": 30,
"unit": "lbs",
"date": "02-19-21"
}
### Retrieve should return the 2 workout just created.
### Status code 200.
GET http://localhost:3000/workouts HTTP/1.1
### Edit Squat.
### Update the ID.
### Status code 200.
PUT http://localhost:3000/workouts/624a0ef6155d0ea1ed569b6a HTTP/1.1
content-type: application/json
{
"name": "Squat",
"reps": 30,
"weight": 30,
"unit": "lbs",
"date": "02-02-20"
}
### Verify that reps value for Squat is now 30 instead of 10.
### Status code 200.
GET http://localhost:3000/workouts HTTP/1.1
### Delete Squat.
### Update the ID.
### Status code 204.
DELETE http://localhost:3000/workouts/624a0ef6155d0ea1ed569b6a HTTP/1.1
### Verify that Squat has been deleted.
### Status code 200.
GET http://localhost:3000/workouts HTTP/1.1