-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTodoRequests.http
More file actions
41 lines (34 loc) · 1005 Bytes
/
TodoRequests.http
File metadata and controls
41 lines (34 loc) · 1005 Bytes
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
### Global variables
@TodoAPI_HostAddress = https://localhost:6061/api
### Get all To-Do items
GET {{TodoAPI_HostAddress}}/todos
Content-Type: application/json
Accept: application/json
### Create a new To-Do item
POST {{TodoAPI_HostAddress}}/todos
Content-Type: application/json
Accept: application/json
{
"title": "My First Todo",
"isComplete": false
}
### Get a single To-Do item by ID
# Replace {{id}} with an actual To-Do ID after creating one.
GET {{TodoAPI_HostAddress}}/todos/{{id}}
Content-Type: application/json
Accept: application/json
### Update an existing To-Do item
# Replace {{id}} with an actual To-Do ID to update it.
PUT {{TodoAPI_HostAddress}}/todos/{{id}}
Content-Type: application/json
Accept: application/json
{
"id": {{id}},
"title": "My Updated Todo",
"isComplete": true
}
### Delete an existing To-Do item
# Replace {{id}} with an actual To-Do ID to delete it.
DELETE {{TodoAPI_HostAddress}}/todos/{{id}}
Content-Type: application/json
Accept: application/json