Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
 new RouteBuilder() {
    public void configure() {
        from("direct:start")
            .setHeader(org.apache.camel.component.http.HttpMethods.HTTP_METHOD, org.apache.camel.component.http.HttpMethods.POST)
	    .to("http://www.google.com")
            .to("mock:results");
    }            
};
	    

And the equivalent spring sample:

Code Block
xml
xml

<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
  <route>
    <from uri="direct:start"/>
    <setHeader headerName="http.requestMethod" value="POST"/>
    <to uri="http://www.google.com"/>
    <to uri="mock:results"/>
  </route>
</camelContext>
Include Page
CAMEL:Endpoint See Also
CAMEL:Endpoint See Also