设计
This commit is contained in:
31
templates/server_sample/test/demo/crud.http
Normal file
31
templates/server_sample/test/demo/crud.http
Normal file
@@ -0,0 +1,31 @@
|
||||
### 创建示例数据(需要 JWT)
|
||||
POST http://127.0.0.1:12426/Sample/v1/sample/demo
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
{
|
||||
"name": "Alice",
|
||||
"age": 25
|
||||
}
|
||||
|
||||
### 列表查询
|
||||
GET http://127.0.0.1:12426/Sample/v1/sample/demo?page=1&size=20
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
### 详情查询
|
||||
GET http://127.0.0.1:12426/Sample/v1/sample/demo/{{identity}}
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
### 更新
|
||||
PUT http://127.0.0.1:12426/Sample/v1/sample/demo/{{identity}}
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
{
|
||||
"name": "Alice Updated",
|
||||
"age": 26
|
||||
}
|
||||
|
||||
### 删除
|
||||
DELETE http://127.0.0.1:12426/Sample/v1/sample/demo/{{identity}}
|
||||
Authorization: Bearer {{token}}
|
||||
Reference in New Issue
Block a user