-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnote.http
More file actions
90 lines (72 loc) · 1.68 KB
/
note.http
File metadata and controls
90 lines (72 loc) · 1.68 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
## 插入单条笔记
POST http://127.0.0.1:9527
Content-Type: application/json
{
"title":"foo",
"content":"bar"
}
## 插入多条笔记
POST http://127.0.0.1:9527/many
Content-Type: application/json
[
{
"title":"note1",
"content":"笔记1"
},
{
"title":"note2",
"content":"笔记2"
},
{
"title":"note3",
"content":"笔记3"
}
]
## 全部笔记
GET http://127.0.0.1:9527
Content-Type: application/json
## 分页显示笔记(无参数)
GET http://127.0.0.1:9527/pagination
Content-Type: application/json
## 分页显示笔记,显式第1页
GET http://127.0.0.1:9527/pagination?page=0
Content-Type: application/json
## 分页显示笔记,第2页
GET http://127.0.0.1:9527/pagination?page=1
Content-Type: application/json
## 获取笔记
GET http://127.0.0.1:9527/d100i1kdrfaihab7dmjg
Content-Type: application/json
## 修改单条笔记
PUT http://127.0.0.1:9527
Content-Type: application/json
{
"id":"d100i1kdrfaihab7dmjg",
"title":"note3 <UPDATED>",
"content":"笔记 <UPDATED>"
}
## 修改或插入单条笔记【修改】
PATCH http://127.0.0.1:9527
Content-Type: application/json
{
"id":"d100i1kdrfaihab7dmjg",
"title":"note3 <UPDATED_1>",
"content":"笔记 <UPDATED_1>"
}
## 修改或插入单条笔记【插入】
PATCH http://127.0.0.1:9527
Content-Type: application/json
{
"title":"note4",
"content":"笔记4"
}
## 替换笔记
PUT http://127.0.0.1:9527/d100i1kdrfaihab7dmjg
Content-Type: application/json
{
"title":"note3 <REPLACED>",
"content":"笔记 <REPLACED>"
}
## 删除笔记
DELETE http://127.0.0.1:9527/d1198pkdrfaq966pf0ig
Content-Type: application/json