ApacheCammel Restlet生产者主体密钥
我有一个问题,让尸体通过休息。我在Apache Camel中的路线是:ApacheCammel Restlet生产者主体密钥,rest,apache-camel,Rest,Apache Camel,我有一个问题,让尸体通过休息。我在Apache Camel中的路线是: from("timer:msgGen?period=2000") .setBody(simple("A Test")) .to("restlet:http://localhost:8888/?restletMethod=POST"); localhost:8888是fiddler。() fiddler上的其余响应为: A%20Test&breadcrumbId=ID-W530-60491-14151
from("timer:msgGen?period=2000")
.setBody(simple("A Test"))
.to("restlet:http://localhost:8888/?restletMethod=POST");
localhost:8888是fiddler。()
fiddler上的其余响应为:
A%20Test&breadcrumbId=ID-W530-60491-1415112773228-0-11&firedTime=Tue%20Nov%2004%2015%3A53%3A06%20CET%202014
编码以更好地阅读:
A Test&breadcrumbId=ID-W530-60491-1415112773228-0-11&firedTime=Tue Nov 04 15:53:06 CET 2014
但我认为必须是:
body=A Test&breadcrumbId=ID-W530-60491-1415112773228-0-11&firedTime=Tue Nov 04 15:53:06 CET 2014
关键的“身体”不见了,还是我的信息有误
它是一个Bug还是一个特性?我怎样才能解决这个问题?要获取键值对
谢谢好的,我解决了这个问题:
from("timer:msgGen?period=2000")
.setBody(simple("A Test"))
.to("http4://localhost:8888/");
这是您需要的Maven依赖项:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http4</artifactId>
<version>2.14.0</version>
</dependency>
org.apache.camel
骆驼-http4
2.14.0
感谢您的帮助您没有设置以body开头的响应。Camel restlet producer不会将body=添加到那里。