-
Notifications
You must be signed in to change notification settings - Fork 25
API
xcsoft edited this page Feb 25, 2022
·
5 revisions
POST & GET /api/url
url 原网址 (GET方式请先将原网址进行URL编码)(10~255)
short 自定义短网址 (4~10)
encode 返回方式 (可选json、xml,默认为json)
{
"code": 1001,
"msg": "url不能为空",
"url": "",
"/**/": "失败返回"
}
{
"code": 0,
"msg": "success",
"url": "https://example.com/success",
"/**/": "成功返回"
}
<!-- 失败 -->
<?xml version="1.0" encoding="utf-8"?>
<res>
<code>-1001</code>
<msg>url不能为空</msg>
<url/>
</res>
<!-- 成功 -->
<?xml version="1.0" encoding="utf-8"?>
<res>
<code>0</code>
<msg>success</msg>
<url>https://example.com/success</url>
</res>