Apigee API终点给出了503的浏览器,但在Apigee跟踪和卷曲200 [英] Apigee API end point gives 503 on the browser, but a 200 on Apigee trace and curl

查看:400
本文介绍了Apigee API终点给出了503的浏览器,但在Apigee跟踪和卷曲200的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Apigee代理来调用我们的API。当我们Apigee跟踪中对其进行测试,一切运作良好。也工作正常卷曲。但在一个浏览器,它给出了一个503这不是一致的,虽然,有时它给在浏览器上一个200太。尝试过Chrome和Firefox,相同的行为。

We use Apigee proxy to invoke our API. All works well when we test it out within Apigee trace. Also works fine with curl. But on a browser, it gives a 503. This is not consistent though, sometimes it gives a 200 on the browser too. Tried Chrome and Firefox, same behavior.

我们的API仍执行良好,但。我们不返回任何响应,只设置状态。什么我们可以尝试在浏览器上获得了200任何想法?

Our API still executes well though. We do not return any response, merely set the status. Any ideas on what we could try out to get a 200 on the browser?

推荐答案

东西夫妇检查:


  1. 检查您的浏览器有一个DNS条目缓存。有时服务,如ELB改变实际的IP地址。因此,缓存DNS条目可能会导致503

  2. 另一个你可能要检查的区别是所使用的HTTP动词。浏览器发送一个GET请求。但卷曲的命令可以做所有。所以,如果你的服务是专门服务于未调用GET,你可能会得到一些服务器端错误。同时卷曲发,即使你没有明确地发送某些头。例如,接受: / 的报头和用户代理头等等。检查如果服务器不同的行为基于这些头。

  1. Check if your Browser has a DNS entry caching. Sometimes services like ELB changes the actual IPs. So caching DNS entries may result in 503.
  2. Another you may want to check is the difference is in the HTTP Verb used. Browsers send a GET request. But curl commands can do all. So if your service is specifically not serving GET calls you may get some server side errors. Also curl sends certain headers even if you do not explicitly send. E.g., Accept:/ header and user-agent header etc. Check if the server is behaving differently based on those headers.

这篇关于Apigee API终点给出了503的浏览器,但在Apigee跟踪和卷曲200的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆