package
0.0.0-20200318144709-a3e3982f2c21
Repository: https://github.com/zhanghe06/gin_project.git
Documentation: pkg.go.dev
# Functions
创建记录 curl -i -X POST http://0.0.0.0:8080/v1/daily_sentence -d '{"Author": "Tom", "Title": "this is a test", "Classification": "news"}'.
删除记录 curl -i -X DELETE http://0.0.0.0:8080/v1/daily_sentence/2.
关于页面 curl -i -X GET http://0.0.0.0:8080/download.
关于页面 curl -i -X GET http://0.0.0.0:8080/about.
获取详情 curl -i -X GET http://0.0.0.0:8080/v1/daily_sentence/1.
首页页面 curl -i -X GET http://0.0.0.0:8080.
首页页面 curl -i -X GET http://0.0.0.0:8080/v1/info.
获取列表 curl -u username:password -i -X GET http://0.0.0.0:8080/v1/token curl -u foo:bar -i -X GET http://0.0.0.0:8080/v1/token.
获取列表 curl -i -X GET http://0.0.0.0:8080/v1/daily_sentences.
修改记录标题 curl -i -X PUT http://0.0.0.0:8080/v1/daily_sentence/1/title -d '{"title": "测试更换标题"}'.
打分 curl -i -X PATCH http://0.0.0.0:8080/v1/daily_sentence/1/score -d '{"score": 0}'.
流式请求 curl -i -X GET http://0.0.0.0:8080/v1/stream/crd.
流式请求(利用 H5 的新特性 SSE) curl -i -X GET http://0.0.0.0:8080/v1/stream/sse https://www.html5rocks.com/en/tutorials/eventsource/basics/.
更新记录 curl -i -X PUT http://0.0.0.0:8080/v1/daily_sentence/1 -d '{"Author": "Tom"}'.
更新记录curl -X POST \ http://0.0.0.0:8080/v1/daily_sentence/transaction \ -H 'Content-Type: application/json' \ -d '{ "id": "1", "Title": "this is a test", "Classification": "news"}'.