camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf <omgolafg...@gmail.com>
Subject how to set null body
Date Fri, 28 Mar 2014 08:59:35 GMT
Hello,

at some point in my route I need to make a GET request. According to the
documentation the body must be null for GET. Asserting null body however
does not work.

from("")
...
...
.setBody(simple(null)).to("http://example.com/id/1)
.process(new MyProcessor()).to("mock:target");

TEST:

httpEndpoint.message(0).body().isEqualTo(null);
java.lang.AssertionError: Assertion error at index 0 on mock mock://httpjson
with predicate: body == null evaluated as: Simple: null == null on
Exchange[Message: Simple: null]


Thanks!




--
View this message in context: http://camel.465427.n5.nabble.com/how-to-set-null-body-tp5749484.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message