【问题标题】:Jetty converts POST requests into GET requestsJetty 将 POST 请求转换为 GET 请求
【发布时间】:2016-10-14 06:07:42
【问题描述】:

我的 apache 骆驼驱动应用程序将 HTTP POST(带正文)调用发送到 Web 服务器。但是在我将 web 服务器 url 更改为以下之后,camel jetty 将我的 POST 转换为 GET 请求(没有正文)并发送到失败的端点,因为 web 服务器需要一个 POST 请求。如何防止这种转换?

http://localhost:9080/partner/listener/mmsTPA/?apikey=af85c412-844a-f507f4cdc9d5

注意:有一个“?”在 url 中,因为它是一个遗留系统

【问题讨论】:

  • 你可以通过设置标题CamelHttpMethod=POST来告诉Camel使用POST。
  • 谢谢。我没有在代码的正确位置设置 CamelHttpMethod 标头

标签: apache-camel jetty


【解决方案1】:

看完后解决了

createMethod() of org.apache.camel.component.http.helper.HttpHelper.java file. 

我没有在我的代码的正确位置设置 CamelHttpMethod 标头。

【讨论】:

    猜你喜欢
    • 2018-11-22
    • 1970-01-01
    • 2012-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-10
    相关资源
    最近更新 更多