CareyWang / MyUrls

Your Own URL Shortener
MIT License
304 stars 126 forks source link

longUrl is empty #2

Closed hunao0221 closed 4 years ago

hunao0221 commented 4 years ago

服务端返回下面的数据

{
    "Code": 1,
    "Message": "longUrl为空",
    "LongUrl": "",
    "ShortUrl": ""
}

但是请求参数中提交了longUrl,下面是日志:

[GIN] 2020/04/21 - 04:48:50 | 400 |      79.993µs |      172.17.0.1 | POST     "/short?longUrl=aHR0cHM6Ly93d3cueW91dHViZS5jb20v"

请问这个怎么解决?

hunao0221 commented 4 years ago

抱歉,我知道是什么问题了,原来longUrl应该放在Body里面,我之前直接放在url后面了