You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2013/01/22 23:18:47 UTC

svn commit: r847591 - in /websites/production/camel/content: cache/main.pageCache http4.html

Author: buildbot
Date: Tue Jan 22 22:18:46 2013
New Revision: 847591

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/http4.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/http4.html
==============================================================================
--- websites/production/camel/content/http4.html (original)
+++ websites/production/camel/content/http4.html Tue Jan 22 22:18:46 2013
@@ -205,12 +205,12 @@ from(<span class="code-quote">"direct:st
 </pre>
 </div></div>
 
-<p>You can override the HTTP endpoint URI by adding a header with the key, <tt>HttpConstants.HTTP_URI</tt>, on the message.</p>
+<p>You can override the HTTP endpoint URI by adding a header with the key, <tt>Exchange.HTTP_URI</tt>, on the message.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:start"</span>)
-            .setHeader(HttpConstants.HTTP_URI, constant(<span class="code-quote">"http:<span class="code-comment">//newhost"</span>))
-</span>	    .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost"</span>);</span>
+  .setHeader(Exchange.HTTP_URI, constant(<span class="code-quote">"http:<span class="code-comment">//newhost"</span>))
+</span>  .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost"</span>);</span>
 </pre>
 </div></div>
 <p>In the sample above Camel will call the <a shape="rect" class="external-link" href="http://newhost" rel="nofollow">http://newhost</a> despite the endpoint is configured with <a shape="rect" class="external-link" href="http4://oldhost" rel="nofollow">http4://oldhost</a>.<br clear="none">
@@ -222,15 +222,15 @@ Where Constants is the class, <tt>org.ap
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:start"</span>)
-	    .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost?order=123&amp;detail=<span class="code-object">short</span>"</span>);</span>
+  .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost?order=123&amp;detail=<span class="code-object">short</span>"</span>);</span>
 </pre>
 </div></div>
 <p>Or options provided in a header:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:start"</span>)
-            .setHeader(Exchange.HTTP_QUERY, constant(<span class="code-quote">"order=123&amp;detail=<span class="code-object">short</span>"</span>))
-	    .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost"</span>);</span>
+  .setHeader(Exchange.HTTP_QUERY, constant(<span class="code-quote">"order=123&amp;detail=<span class="code-object">short</span>"</span>))
+  .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost"</span>);</span>
 </pre>
 </div></div>
 
@@ -242,9 +242,9 @@ from(<span class="code-quote">"direct:st
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:start"</span>)
-            .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.POST))
-	    .to(<span class="code-quote">"http4:<span class="code-comment">//www.google.com"</span>)
-</span>            .to(<span class="code-quote">"mock:results"</span>);
+  .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.POST))
+  .to(<span class="code-quote">"http4:<span class="code-comment">//www.google.com"</span>)
+</span>  .to(<span class="code-quote">"mock:results"</span>);
 </pre>
 </div></div>
 
@@ -283,7 +283,7 @@ from(<span class="code-quote">"direct:st
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:start"</span>)
-	    .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost?proxyAuthHost=www.myproxy.com&amp;proxyAuthPort=80"</span>);</span>
+  .to(<span class="code-quote">"http4:<span class="code-comment">//oldhost?proxyAuthHost=www.myproxy.com&amp;proxyAuthPort=80"</span>);</span>
 </pre>
 </div></div>
 
@@ -330,9 +330,9 @@ exchange.setProperty(Exchange.CHARSET_NA
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"timer:<span class="code-comment">//foo?fixedRate=<span class="code-keyword">true</span>&amp;delay=0&amp;period=10000"</span>)
-</span>    .to(<span class="code-quote">"http4:<span class="code-comment">//www.google.com"</span>)
-</span>    .setHeader(FileComponent.HEADER_FILE_NAME, <span class="code-quote">"message.html"</span>)
-    .to(<span class="code-quote">"file:target/google"</span>);
+</span>  .to(<span class="code-quote">"http4:<span class="code-comment">//www.google.com"</span>)
+</span>  .setHeader(FileComponent.HEADER_FILE_NAME, <span class="code-quote">"message.html"</span>)
+  .to(<span class="code-quote">"file:target/google"</span>);
 </pre>
 </div></div>
 
@@ -364,12 +364,12 @@ headers.put(HttpProducer.QUERY, <span cl
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Exchange exchange = template.send(<span class="code-quote">"http4:<span class="code-comment">//www.google.com/search"</span>, <span class="code-keyword">new</span> Processor() {
-</span>            <span class="code-keyword">public</span> void process(Exchange exchange) <span class="code-keyword">throws</span> Exception {
-                exchange.getIn().setHeader(HttpProducer.QUERY, constant(<span class="code-quote">"hl=en&amp;q=activemq"</span>));
-            }
-   });
-   Message out = exchange.getOut();
-   <span class="code-object">int</span> responseCode = out.getHeader(HttpProducer.HTTP_RESPONSE_CODE, <span class="code-object">Integer</span>.class);
+</span>  <span class="code-keyword">public</span> void process(Exchange exchange) <span class="code-keyword">throws</span> Exception {
+    exchange.getIn().setHeader(HttpProducer.QUERY, constant(<span class="code-quote">"hl=en&amp;q=activemq"</span>));
+  }
+});
+Message out = exchange.getOut();
+<span class="code-object">int</span> responseCode = out.getHeader(HttpProducer.HTTP_RESPONSE_CODE, <span class="code-object">Integer</span>.class);
 </pre>
 </div></div>