短网址 源码
短网址 go_zero 示例 一:正常情况 进入api目录,启动rest server: go run shorturl.go 访问服务: curl -i "http://localhost:8888/shorten?url=http://www.xiaoheiban.cn" 5s后会响应: HTTP/ 1.1 200 OK Content-Type: application/json Date: Wed, 04 Nov 2020 08:19:57 GMT Content-Length: 14 { " shorten " : " " } 二:模拟优雅关闭场景 进入api目录,启动rest
下载地址
用户评论