-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsample.http
48 lines (36 loc) · 1.89 KB
/
sample.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
### Get all todos
GET http://localhost:5000/todo/
### Create a todo
POST http://localhost:5000/todo/
Content-Type: application/json
{
"Id": "2b8b06f4-739c-4638-9876-953b1003c799",
"Title": "Learn F# GUID",
"Description": "Learn all about the language"
}
### Create a todo - validation errors
POST http://localhost:5000/todo/
{
"Description": "This is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second testThis is a second test"
}
### Examples of error handling
GET http://localhost:5000/todo/INVALID-GUID
GET http://localhost:5000/todo/00000000-0000-0000-0000-000000000000
GET http://localhost:5000/todo/e3608184-c840-486b-92f8-552944fbde0d
### Get a specific todo
GET http://localhost:5000/todo/2b8b06f4-739c-4638-9876-953b1003c799
### Edit a todo
PUT http://localhost:5000/todo/2b8b06f4-739c-4638-9876-953b1003c799
Content-Type: application/json
{
"title": "Learn F# 2",
"description": "Learn all about the language, but for real!"
}
### Complete a todo
PUT http://localhost:5000/todo/2b8b06f4-739c-4638-9876-953b1003c799/complete
### Delete a todo
DELETE http://localhost:5000/todo/02b64e52-7542-49e6-b8d8-1f893b0245de
### Get stats
GET http://localhost:5000/todo/stats
### Clear all todos
DELETE http://localhost:5000/todo/