尝试使用jquery ajax从我自己的域中调用简单的post
$.ajax({
dataType: "json",
type: "POST",
url: '/api/v1/tenants/all',
data: {
},
success: function (res){
console.log('success')
console.log(res);
drawPlacesOnMap(res.results)
},
error: function (res){
console.log('error')
console.log(res)
alert(res.responseJSON.error)
}
});
被阻止。该请求未到达lambda应用程序。 并已部署。
有什么想法吗?
答案 0 :(得分:-1)
问题出在makePromiseToGetA()
.then(makePromiseToGetB)
.then((b: B) =>
sendHttpRequestAxios(b)
.then(outputResponse)
.catch(handleAxiosError)
)
.catch(handleError)
:-)
将/
从url
更改为/api/v1/tenants/all