为什么我的休息界面在被api经理混淆后返回“{”错误“:”服务器没有响应“}”

时间:2016-12-27 03:56:32

标签: wso2 wso2-am wso2apicloud

我用api manager设计了一个新的api。当我在api控制台中调用它时,它提示msg为下面的jpg。

look at the jpg ,plz, Those is the following logs after do curl as the folloing

curl -X GET --header'Eccept:application / json'--header'授权:Bearer 8dfb0253-5906-3ee5-ab28-cd53bc190ddc''http://172.17.0.1:8280/V2.0.0/common/test/test'

enter image description here

enter image description here enter image description here

1 个答案:

答案 0 :(得分:2)

问题和解决方案的可能原因

  1. Gatway使用https和自我认证。在浏览器中键入网关URL并接受证书,然后尝试使用api console
  2. CORS问题。按文档https://docs.wso2.com/display/AM200/Key+Concepts#KeyConcepts-Cross-originresourcesharing
  3. 中的说明启用CORS