title: Camel HTTP Endpoint: How to set URL-String to POST Parameter
body: <p><strong>Prerequisites</strong></p>
  
  <ul>
  <li>Apache Tomcat 7</li>
  <li>Spring 3.2.11.RELEASE</li>
  <li>Apache Camel 2.14.1</li>
  <li>Camel HTTP Endpoint (<code>&lt;artifactId&gt;camel-http&lt;/artifactId&gt;</code>)</li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <p>At the moment I use following code to set POST-Parameters to the message body.
  The camel HTTP-Component reads the parameters and sends it.</p>
  
  <pre><code>.setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.POST.name()))
  .setHeader(Exchange.CONTENT_TYPE, constant("application/x-www-form-urlencoded; charset: UTF-8"))
  .setHeader(Exchange.CONTENT_ENCODING, constant("UTF-8"))
  .setBody("parameter1=a&amp;parameter2=b")
  </code></pre>
  
  <p>The problem ist that some parameters are URLs itself.
  So something like this should be send as POST-Request:</p>
  
  <pre><code>postparameter1=a&amp;postparameter2=http://www.`...`.com?urlparam1=value1&amp;urlparam2=value2&amp;postparameter3=b
  </code></pre>
  
  <p>My question is how to send "<a href="http://www">http://www</a>.<code>...</code>.com?urlparam1=value1&amp;urlparam2=value2" as value of postparameter2.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards,</p>
  
  <p>Max</p>