【问题标题】:Mule Server 3.6 > Anypoint Studio > Request ConnectorMule Server 3.6 > Anypoint Studio > 请求连接器
【发布时间】:2015-08-29 04:08:10
【问题描述】:

如何设置请求连接器以使用 POST 方法发送原始 JSON 数据?

在我的 Set Payload 转换器上,我有这个:

#[{ "productId": #[sessionVars.productId] }]

当我运行我的 Mule 应用程序时,我收到以下错误:

Error sending HTTP request. Message payload is of type: String

我错过了什么?

【问题讨论】:

    标签: json post mule esb mule-studio


    【解决方案1】:

    你可以试试添加

     <set-variable variableName="Content-Type" value="application/json" />
    

    就在您的 http 请求端点上方。

    更多详情请看here

    让我知道这是否适合你。

    【讨论】:

      猜你喜欢
      • 2015-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多