How to get the response status code after a camel http call

Susanna Michael picture Susanna Michael · Mar 21, 2018 · Viewed 12.8k times · Source

Hi I am quite new to Camel. I a executing a https4 call from camel route. I want to get the status code for the response. Where can I get this from?

Answer

Themis Pyrgiotis picture Themis Pyrgiotis · Mar 21, 2018

Response is located in the Camel's header CamelHttpResponseCode.

You can get the value of the header with simple language

${header.CamelHttpResponseCode}

More details about http4 component are http://camel.apache.org/http4.html