Created
December 8, 2014 13:23
-
-
Save daniilyar/1c01da493747dc8dabd2 to your computer and use it in GitHub Desktop.
How to make camel redirect requests in a maximum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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