title: Camel as an HTTP Proxy to a REST service - How to route paths and parameters?
body: <p>I am trying to use Apache Camel as an HTTP proxy to a REST service, performing some auth in the middle, and have a route which looks like this (auth removed for testing purposes):</p>
  
  <pre><code>from("servlet:apiwrapper?matchOnUriPrefix=true")
  .to("http://HOST/BASEPATH?bridgeEndpoint=true&amp;amp;throwExceptionOnFailure=false");
  </code></pre>
  
  <p>When accessing the Camel Servlet path like so:</p>
  
  <pre><code>http://CAMELHOST/apiwrapper/node
  http://CAMELHOST/apiwrapper/node/stuff/blah?etc=t
  </code></pre>
  
  <p>And so on... I want to route these through to:</p>
  
  <pre><code>http://HOST/BASEPATH/node
  http://HOST/BASEPATH/node/stuff/blah?etc=t
  </code></pre>
  
  <p>But my current route configuration just sends the requests to</p>
  
  <pre><code>http://HOST/BASEPATH
  </code></pre>
  
  <p>Without appending any of the path/url params I need appended. If I turn off bridgeEndpoint, then I just get errors thrown when the route hits the .to(HTTP) part.</p>
  
  <p>How can I configure this route to map those through?</p>