如何修复Amadeus API 500内部错误? [英] How to fix Amadeus API 500 Internal Error?
本文介绍了如何修复Amadeus API 500内部错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
航班报价搜索V2和航班报价V1端点返回错误。可能是配置问题
The "Flight Offers Search V2" and "Flight Offers Price V1" endpoints are returning errors. Probably it's a configuration issue
推荐答案
航班优惠搜索API 带有2个不同的端点:
Flight Offers Search API comes with 2 different endpoints:
- 使用有限数量的参数进行获取,但对于最常见的用例更易于实现
- POST版本更加完整,可以提供所有类型的过滤功能,但它需要构建JSON主体。在这种情况下,即使是用于搜索,我们也可以使用POST来构建不受长度限制的JSON正文。因此,在庞大的文档中,您会发现
X-HTTP-Method-Override
设置为GET
。
- GET with a limited number of parameters but easier to implement for the most common use cases
- POST version much more complete offering all types of filtering but it requires to build the JSON body. In that context we use a POST to offer the possibility to build the JSON body without length restriction, even if it is for a search. That's why in the swagger documentation you will find
X-HTTP-Method-Override
set atGET
.
航班优惠价格API 是根据航班优惠搜索
的响应构建的。为了允许开发人员重用上一个响应的主体,我们使用动词POST创建了此端点,这就是为什么在庞大的文档中会找到 X-HTTP-Method-Override
设置的原因在 GET
。
The Flight Offers Price API is built from the response of Flight Offers Search
. To allow developers to reuse the body of the previous response we created this endpoint using the verb POST, That's why in the swagger documentation you will find X-HTTP-Method-Override
set at GET
.
这篇关于如何修复Amadeus API 500内部错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文