book

134 阅读1分钟

@url = http://localhost:5500 @json = Content-Type: application/json

@auth=Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJpYXQiOjE2Mzg1MjE2OTksImV4cCI6MTYzODUyNzY5OX0.Zb4UghyVoZFOPZRFwROprf-1pmcdkTpLLG6hnD9mrvA

登录

POST {{url}}/login {{auth}} {{json}}

{ "name":"admin", "pwd":"123456" }

获取数据

GET {{url}}/data {{auth}}

查询

GET {{url}}/tag {{auth}}

添加

POST {{url}}/tag {{auth}} {{json}}

{ "text":"张三" }

删除

DELETE {{url}}/tag HTTP/1.1 {{auth}} {{json}}

{ "_id":"61a9ddf6310c0d6a5a1b9e05" }

查询

GET {{url}}/content {{auth}}

添加

POST {{url}}/content {{auth}} {{json}}

{ "title":"gggfddgg", "content":"易烊千玺易烊千玺易烊千玺", "top":false }

删除

DELETE {{url}}/content HTTP/1.1 {{auth}} {{json}}

{ "id":"61a4861942eaac3c5c6ef5bf" }

查询

GET {{url}}/user {{auth}}

添加

POST {{url}}/user {{auth}} {{json}}

{ "name":"易小千", "mima":"11282276", "email":"3011865496@qq.com", "huzu":"限制会员" }

删除

DELETE {{url}}/user HTTP/1.1 {{auth}} {{json}}

{ "id":"61a4861942eaac3c5c6ef5bf" }

查询内容

GET {{url}}/Content {{auth}}

添加内容

POST {{url}}/Content {{auth}} {{json}}

{ "title":"1111111111", "content":"1222222222" }

修改内容

PUT {{url}}/Content?_id=1 {{auth}} {{json}}

{ "top": true }