Skip to content

Instantly share code, notes, and snippets.

@daniilyar
Created December 8, 2014 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniilyar/1c01da493747dc8dabd2 to your computer and use it in GitHub Desktop.
Save daniilyar/1c01da493747dc8dabd2 to your computer and use it in GitHub Desktop.
How to make camel redirect requests in a maximum
from(url).process(processor).choice()
.when(header("location").isNull()).endChoice()
.when(header("location").contains("?")).recipientList(simple("${header.location}&bridgeEndpoint=true")).endChoice()
.otherwise().recipientList(simple("${header.location}?bridgeEndpoint=true"));
and just modify location header in processor to any url you need to redirect based on input request content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment