请求:
$.ajax({
type : "POST",
contentType : "application/json",
url : 'https://e.ecej.com/api/generate',
data : JSON.stringify({url : "https://emobile.ecej.com/goods-detail/ff80808176d1ff77017867794a0218aa", "auth": "服务端提供的秘钥"}),
success : function(data){
console.log(data);
}
});
返回:
{
"code":200,
"message":"请求成功",
"data":"https://e.ecej.com/Uk6Z6",
"time":"2021-11-18 14:13:55",
"success":true
}
请求:
curl --location --request POST 'https://e.ecej.com/api/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://emobile.ecej.com/goods-detail/ff80808176d1ff77017867794a0218aa",
"auth": "服务端提供的秘钥"
}'
返回:
{
"code":200,
"message":"请求成功",
"data":"https://e.ecej.com/Uk6Z6",
"time":"2021-11-18 14:13:55",
"success":true
}
请求:
请求方式: POST
请求URL: https://e.ecej.com/api/generate
请求头: Content-Type: application/json
请求参数: {"url":"需要转换的长链接字符串", "auth":"服务端提供的秘钥"}
返回:
{
"code":200,
"message":"请求成功",
"data":"https://e.ecej.com/Uk6Z6",
"time":"2021-11-18 14:13:55",
"success":true
}