Set a header with the response code you want. Exchange.CONTENT_TYPE is the key of the header.
On Fri, Mar 25, 2016 at 5:52 AM, urwithsumit <sumit.kushw...@gmail.com> wrote: > Hi, > > I am developing a REST service using apache Camel REST DSL. > In the service if the request validation fail or any excepted failure > happens than I send back a response message with the Custom Error Code. In > this scenario the HTTP Response Code that gets returned is 200Ok. > > I want to Change the Response Code from 200 to some custom Response Code. At > the same time I also want to maintain the Service Response Message. > > How can I achieve this feature. > > Regards > Sumit > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Customize-the-Http-Response-Code-for-REST-Service-tp5779682.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2