Skip to content

Short Url Api

若如初见 edited this page Apr 6, 2022 · 2 revisions

生成短链接

请求说明

请求方式:POST 请求URL :/

请求参数

字段 字段类型 字段说明
longUrl String 需要转换的长链接

返回结果正确 HttpStatus 200

{
  "id": 1,
  "shorts": "bjCPD2",
  "longUrl": "https://github.com/wxyShine/short-url",
  "shortUrl": "https://a-url.tk/s/bjCPD2",
  "createTime": "2022-03-30 08:42:40"
}

参数校验失败 HttpStatus 400