That would be a bit odd as this is the code that maps the netty status to Camel
headers.put(Exchange.HTTP_RESPONSE_CODE, response.getStatus().code()); headers.put(Exchange.HTTP_RESPONSE_TEXT, response.getStatus().reasonPhrase()); Have you turned off mapHeaders by any chance? On Fri, Apr 8, 2016 at 4:39 PM, Alex Soto <alex.s...@envieta.com> wrote: > Hello: > > I am using Camel 2.16.2 and I have a route with a Netty4 HTTP producer > calling a remote HTTP server. I am passing the option > throwExceptionOnFailure=false. Upon return, I need to check the HTTP > response code like this: > > <filter> > <simple>${header.CamelHttpResponseCode} == 403</simple> > > . . . > </filter> > > > The problem is that the CamelHttpResponseCode is always null. I can see it > the trace logs: > > Headers:{CamelHttpResponseCode=null, Connection=keep-alive, > CamelHttpResponseText=Not Modified, Content-Length=0} > > > How can I check the HTTP response code? > > > Best regards, > Alex soto > > > > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2