首页 文章

WSO2 API Manager更改http方法

提问于
浏览
1

wso2 api manager v1.10.0是否允许通过自定义顺序将请求的HTTP方法转换为后端?

我通过发布者Web控制台创建了一个带有http GET资源的api . 但由于 endpoints 仅支持POST方法,我尝试通过使用属性介体按顺序创建自定义来更改HTTP方法:

<property name="HTTP_METHOD" value="POST" scope="axis2"/>

但是响应显示了一条错误消息:

{
  "fault": {
    "code": 403,
    "type": "Status report",
    "message": "Fault Call",
    "description": "No matching resource found in the API for the given request"
  }
}

日志文件只显示以下行:

==> /opt/wso2am-gateway/repository/logs/wso2carbon.log <==
[2016-04-08 10:30:16,868]  INFO -  STATUS = Executing default 'fault' sequence, ERROR_CODE = 403, ERROR_MESSAGE = No matching resource found in the API for the given request {org.apache.synapse.mediators.builtin.LogMediator}

如果我删除属性介体,请求将通过并到达后端 .

有谁知道如何解决这个问题?

1 回答

  • 0

    您还需要在API上定义POST资源(尽管您不使用它)

相关问题