opstalj
opstalj

Reputation: 900

Apache Camel as HTTP proxy: how route to URL with parameters

I am trying to use Camel as HTTP proxy and I am following the example from Apache Camel itself:

  <route>
    <from uri="jetty:http://0.0.0.0:8080/myapp"/>
    <to uri="jetty:http://realserverhostname:8090/myapp?bridgeEndpoint=true"/>
  </route>

Question: what if the URL in the destination should look like the following:

<to uri="jetty:http://realserverhostname:8090/myapp/something?parameterdId=1232345?bridgeEndpoint=true"/>

Looks like the extra "?" in the URI makes the bridgeEndpoint not to be seen, any idea how to get this working?

Upvotes: 1

Views: 3030

Answers (1)

maximdim
maximdim

Reputation: 8169

First of all you should not use more than one question mark in URL. First parameter should be separated by question mark and all subsequent with ampersands (&) which you should probably escape in your config file, so it should look something like:

<to uri="jetty:http://realserverhostname:8090/myapp/something?parameterdId=1232345&amp;bridgeEndpoint=true"/>

Upvotes: 1

Related Questions