设计
This commit is contained in:
31
server/test/demo/crud.http
Normal file
31
server/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}}
|
||||
2
server/test/ping/hello.http
Normal file
2
server/test/ping/hello.http
Normal file
@@ -0,0 +1,2 @@
|
||||
GET http://127.0.0.1:12426/Sample/v1/ping/hello
|
||||
Content-Type: application/json
|
||||
2
server/test/readme.md
Normal file
2
server/test/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# HTTP 接口测试文件,使用 VS Code REST Client 或 IntelliJ HTTP Client 运行。
|
||||
# 将 {{token}}、{{identity}} 替换为实际值。
|
||||
Reference in New Issue
Block a user