【发布时间】:2018-01-10 22:48:53
【问题描述】:
使用 camel-restlet 调用休息端点时,未设置帖子正文。 这是我的 blueprint.xml
<camelContext id="blueprint-bean-context-SF"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="Camel-Restlet-Client">
<from uri="timer://example?repeatCount=1&period=1000" />
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
<setHeader headerName="api-key">
<constant>{{drupal-api-key}}</constant>
</setHeader>
<setBody><constant>{name: "paul rudd", movies: ["I Love You Man", "Role Models"]}</constant></setBody>
<log message="Request: ${headers} \n ${body}" />
<to uri="restlet:https://reqres.in/api/users?restletMethod=POST" />
<log message="Response: ${headers} \n ${body}" />
</route>
</camelContext>
我正在使用骆驼 2.20.1。任何帮助表示赞赏?
【问题讨论】:
标签: apache-camel