短网址
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
web feat: 新增查询短网址WEB接口 Jan 7, 2019
.gitignore feat: 查找和保存数据 Sep 3, 2018
LICENSE Initial commit Sep 3, 2018
README.md feat: 更新API说明文档 Jan 7, 2019
handler.go feat: 新增添加短网址WEB接口 Sep 4, 2018
murmurhash.go init: 初始化git仓库 Sep 3, 2018
shorturl.go feat: 保存时先查询是否存在 Sep 4, 2018

README.md

shorurl

短网址

演示地址:vvia.xyz

API

生成短网址

URL: http://vvia.xyz/s
Method: POST
Parmeters: url
Return: JSON

示例

$ curl -d '{"url":"https://github.com/irealing/shorturl"}' vvia.xyz/s
{"err_no":0,"msg":"success","data":"orv2oe"}

查询短网址真实URL

URL: http://vvia.xyz/s/\<string:shorted\>
Method: GET
Parmeters: url
Return: JSON

示例

$ curl -X GET vvia.xyz/s/orv2oe

{"err_no":0,"msg":"success","data":"https://github.com/irealing/shorturl"}