Setting rest response json directly

2014-11-04 Thread Gary Kennedy
Greetings all, I'm using the camel rest dsl in a karaf osgi blueprint to define my route (and I love it, so easy), and I've got an onException block properly handling my (known) exceptions for an 'application/json' POST endpoint. I've set it to produce 'application/json' and when things go well

Re: Setting rest response json directly

2014-11-04 Thread Claus Ibsen
Hi And using .setBody(simple("{ \"error\": \"${exception.message}\" }")) Does not work? On Wed, Nov 5, 2014 at 7:02 AM, Gary Kennedy wrote: > Greetings all, > > I'm using the camel rest dsl in a karaf osgi blueprint to define my route > (and I love it, so easy), and I've got an onExc

Re: Setting rest response json directly

2014-11-05 Thread Gary Kennedy
--> { "error": "${exception.message}" } (Sorry. I should have included this snippet in the first email) Cheers, Gary -- View t

Re: Setting rest response json directly

2014-11-09 Thread Gary Kennedy
e, making the route POST/GET specific). It might be easier to play with the consumes/produces part of the rest dsl to bring the above theory used above into the rest dsl. Anyways, Cheers, Gary -- View this message in context: http://camel.465427.n5.nabble.com/Setting-rest-response-json-directly-

Re: Setting rest response json directly

2014-12-02 Thread Claus Ibsen
specific). It might be easier to play with the > consumes/produces part of the rest dsl to bring the above theory used above > into the rest dsl. Anyways, > > Cheers, > Gary > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Setting-r