运行 收到 Amadeus low-fare-search API 请求时收到 404 错误
Recieving 404 error when running get request to Amadeus low-fare-search API
您好,我对 Angular 和一般编程还很陌生,我一直在尝试使用 Angular HTTPClient
查询 Amadeus 低价搜索,但失败了,我有一直在寻找答案,但没有找到任何具体的答案,我找到了一些与 "unable to identify proxy".
的具体问题相关的答案
根据一些人的说法,这是因为 URL 不正确。
但这是 Amadeus 页面上的 URL
这是我正在尝试的代码 运行 :
search(){
return this.http.get('http://api.sandbox.amadeus.com/v1.2/flights/low-fare-search?origin=IST&destination=BOS&departure_date=2018-10-15&return_date=2018-10-21&number_of_results=3&apikey=my API key')
.subscribe((data) =>{
console.log(data)},
(err) => {console.log(err)});
这是错误信息
errorcode: "messaging.adaptors.http.flow.ApplicationNotFound"
faultstring:"Unable to identify proxy for host: default and url:
/v1.2/flights/low-fare-search"
谁能用简单的语言向我解释是什么导致了这个错误?
在您的示例中,您使用的是 http 而不是 https
我测试了你的例子,它对我有用:
您好,我对 Angular 和一般编程还很陌生,我一直在尝试使用 Angular HTTPClient
查询 Amadeus 低价搜索,但失败了,我有一直在寻找答案,但没有找到任何具体的答案,我找到了一些与 "unable to identify proxy".
根据一些人的说法,这是因为 URL 不正确。 但这是 Amadeus 页面上的 URL
这是我正在尝试的代码 运行 :
search(){
return this.http.get('http://api.sandbox.amadeus.com/v1.2/flights/low-fare-search?origin=IST&destination=BOS&departure_date=2018-10-15&return_date=2018-10-21&number_of_results=3&apikey=my API key')
.subscribe((data) =>{
console.log(data)},
(err) => {console.log(err)});
这是错误信息
errorcode: "messaging.adaptors.http.flow.ApplicationNotFound" faultstring:"Unable to identify proxy for host: default and url: /v1.2/flights/low-fare-search"
谁能用简单的语言向我解释是什么导致了这个错误?
在您的示例中,您使用的是 http 而不是 https
我测试了你的例子,它对我有用: