- Fuse Mediation Route 2.x
- JBoss Fuse 6.0
Can you please provide an example on how to configure HTTP Proxying in Camel?
If you look for a ready-to-use demo, please check out the demo at
Simply follow the instruction in the provided readme.md.
This demo uses the following simple route definition to proxy HTTP requests from http://localhost:9000/weather to http://weather.yahoo.com/united-states.
<camelContext xmlns="http://camel.apache.org/schema/spring"> <route id="camel-http-proxy"> <from uri="jetty://http://localhost:9000/weather?matchOnUriPrefix=true"/> <to uri="http://weather.yahoo.com/united-states?bridgeEndpoint=true&throwExceptionOnFailure=false" /> <to uri="log:MyLogger?level=INFO&showAll=true" /> </route> </camelContext>
Its important to use matchOnUriPrefix=true and bridgeEndpoint=true.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.