生成的代码
await $.ajax({
"url":"https://echo.apipost.cn/token.php",
"method":"POST",
// 这里有 BUG,ContentType值不对
"content-type":"appication/json",
"data":JSON.stringify({
"email":"admin@admin.com",
"password":"密码"
}),
"success":function(response){
response = typeof response == "object" ? response : JSON.parse(response);
console.log(response);
apt.variables.set("token", response.token);
}
});
其中,content-type 为 appication/json,正确的值应为:application/json
response打印这个看看
感谢