camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Zurowski <gre...@zurowski.org>
Subject Rest DSL Media Type
Date Fri, 21 Aug 2015 08:55:14 GMT
Hi everyone:

When I set up the following simple route with Camel 2.15.2 and Rest
DSL, the response will not contain the media type as specified by the
'produces' verb:

rest("/hello")
   .produces("application/json")
   .get("/{name}").to("direct:hello");

from("direct:hello").transform(simple("{ ${header.name} }"));

The correct media type is returned when an object is returned by the
route and binding mode is set to JSON. If a string is returned as
above, and binding is disabled, no media type is set. I am wondering
if this is intentional or whether I am missing something?

Thanks in advance,
Gregor

Mime
View raw message