短网址
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
.gitignore
LICENSE
README.md
handler.go
murmurhash.go
shorturl.go

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"}