You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/02/23 13:16:37 UTC

[1/4] camel git commit: CAMEL-10878: camel-http / camel-http4 - Allow to specify HTTP operation as uri parameter

Repository: camel
Updated Branches:
  refs/heads/master f0a4852ba -> f7a75746a


CAMEL-10878: camel-http / camel-http4 - Allow to specify HTTP operation as uri parameter


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c0b09137
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c0b09137
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c0b09137

Branch: refs/heads/master
Commit: c0b091376ae79f8d29bb7c60a1fcfc4abc8871d6
Parents: f0a4852
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Feb 23 13:19:13 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Feb 23 13:49:27 2017 +0100

----------------------------------------------------------------------
 .../camel/http/common/HttpCommonEndpoint.java   | 13 ++++
 .../apache/camel/http/common/HttpHelper.java    | 22 +++---
 .../src/main/docs/http-component.adoc           |  5 +-
 .../component/http/HttpGetUriParamTest.java     | 75 ++++++++++++++++++++
 .../http4/helper/HttpMethodHelper.java          | 23 +++---
 .../camel/component/http4/HttpMethodsTest.java  | 12 ++++
 .../JettyHttpProducerGetAsUriParamTest.java     | 70 ++++++++++++++++++
 7 files changed, 200 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 8890cca..0854085 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -132,6 +132,8 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     private boolean async;
     @UriParam(label = "producer", description = "Configure a cookie handler to maintain a HTTP session")
     private CookieHandler cookieHandler;
+    @UriParam(label = "producer", description = "Configure the http Method to use as URI param. In case this is set, it can't be overriden by the HttpMethod header.")
+    private String httpMethod;
 
     public HttpCommonEndpoint() {
     }
@@ -553,4 +555,15 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     public void setCookieHandler(CookieHandler cookieHandler) {
         this.cookieHandler = cookieHandler;
     }
+
+	public String getHttpMethod() {
+		return httpMethod;
+	}
+
+    /**
+     * Configure the Http method to use
+     */
+	public void setHttpMethod(String httpMethod) {
+		this.httpMethod = httpMethod;
+	}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
index 8d64351..8252063 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
@@ -514,16 +514,20 @@ public final class HttpHelper {
 
         // compute what method to use either GET or POST
         HttpMethods answer;
-        HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
-        if (m != null) {
-            // always use what end-user provides in a header
-            answer = m;
-        } else if (queryString != null) {
-            // if a query string is provided then use GET
-            answer = HttpMethods.GET;
+        if (ObjectHelper.isNotEmpty(endpoint.getHttpMethod())) {
+        	answer = HttpMethods.valueOf(endpoint.getHttpMethod());
         } else {
-            // fallback to POST if we have payload, otherwise GET
-            answer = hasPayload ? HttpMethods.POST : HttpMethods.GET;
+            HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
+            if (m != null) {
+                // always use what end-user provides in a header
+                answer = m;
+            } else if (queryString != null) {
+                // if a query string is provided then use GET
+                answer = HttpMethods.GET;
+            } else {
+                // fallback to POST if we have payload, otherwise GET
+                answer = hasPayload ? HttpMethods.POST : HttpMethods.GET;
+            }
         }
 
         return answer;

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http/src/main/docs/http-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc
index 5f524ba..5cc67ea 100644
--- a/components/camel-http/src/main/docs/http-component.adoc
+++ b/components/camel-http/src/main/docs/http-component.adoc
@@ -141,7 +141,7 @@ The HTTP component supports 6 options which are listed below.
 
 
 // endpoint options: START
-The HTTP component supports 26 endpoint options which are listed below:
+The HTTP component supports 27 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -149,6 +149,7 @@ The HTTP component supports 26 endpoint options which are listed below:
 | Name | Group | Default | Java Type | Description
 | httpUri | producer |  | URI | *Required* The url of the HTTP endpoint to call.
 | disableStreamCache | common | false | boolean | Determines whether or not the raw input stream from Servlet is cached or not (Camel will read the stream into a in memory/overflow to file Stream caching) cache. By default Camel will cache the Servlet input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream such as streaming it directly to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option to improve performance in case you do not need to read the message payload multiple times. The http/http4 producer will by default cache the response body stream. If setting this option to true then the producers will not ca
 che the response body stream but use the response stream as-is as the message body.
+| httpMethod | common |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | authMethodPriority | producer |  | String | Authentication method for proxy either as Basic Digest or NTLM.
 | bridgeEndpoint | producer | false | boolean | If the option is true HttpProducer will ignore the Exchange.HTTP_URI header and use the endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let the HttpProducer send all the fault response back.
 | chunked | producer | true | boolean | If this option is false the Servlet will disable the HTTP streaming and set the content-length header on the response
@@ -522,4 +523,4 @@ keystore and truststore as described above, it will work fine.
 * link:endpoint.html[Endpoint]
 * link:getting-started.html[Getting Started]
 
-* link:jetty.html[Jetty]
\ No newline at end of file
+* link:jetty.html[Jetty]

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetUriParamTest.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetUriParamTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetUriParamTest.java
new file mode 100644
index 0000000..6c63033
--- /dev/null
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetUriParamTest.java
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ */
+public class HttpGetUriParamTest extends CamelTestSupport {
+    
+    @Test
+    @Ignore("ignore online tests")
+    public void testHttpGet() throws Exception {
+        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results", MockEndpoint.class);
+        mockEndpoint.expectedMessageCount(1);
+
+        template.sendBody("direct:start", null);
+
+        mockEndpoint.assertIsSatisfied();
+        List<Exchange> list = mockEndpoint.getReceivedExchanges();
+        Exchange exchange = list.get(0);
+        assertNotNull("exchange", exchange);
+
+        Message in = exchange.getIn();
+        assertNotNull("in", in);
+
+        Map<String, Object> headers = in.getHeaders();
+
+        log.debug("Headers: " + headers);
+        checkHeaders(headers);       
+
+        String body = in.getBody(String.class);
+
+        log.debug("Body: " + body);
+        assertNotNull("Should have a body!", body);
+    }
+
+    protected void checkHeaders(Map<String, Object> headers) {
+        assertTrue("Should be more than one header but was: " + headers, headers.size() > 0);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                getContext().addComponent("http2", new HttpComponent());
+                from("direct:start").setHeader(Exchange.HTTP_QUERY, constant("hl=en&q=activemq"))
+                    .to("http2://www.google.com/search?httpMethod=GET").to("mock:results");
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
index 57c4c9d..36714ae 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
@@ -23,6 +23,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RuntimeExchangeException;
 import org.apache.camel.component.http4.HttpEndpoint;
 import org.apache.camel.component.http4.HttpMethods;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
 
 public final class HttpMethodHelper {
@@ -62,16 +63,20 @@ public final class HttpMethodHelper {
 
         // compute what method to use either GET or POST
         HttpMethods answer;
-        HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
-        if (m != null) {
-            // always use what end-user provides in a header
-            answer = m;
-        } else if (queryString != null) {
-            // if a query string is provided then use GET
-            answer = HttpMethods.GET;
+        if (ObjectHelper.isNotEmpty(endpoint.getHttpMethod())) {
+        	answer = HttpMethods.valueOf(endpoint.getHttpMethod());
         } else {
-            // fallback to POST if we have payload, otherwise GET
-            answer = hasPayload ? HttpMethods.POST : HttpMethods.GET;
+            HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
+            if (m != null) {
+                // always use what end-user provides in a header
+                answer = m;
+            } else if (queryString != null) {
+                // if a query string is provided then use GET
+                answer = HttpMethods.GET;
+            } else {
+                // fallback to POST if we have payload, otherwise GET
+                answer = hasPayload ? HttpMethods.POST : HttpMethods.GET;
+            }
         }
 
         return answer;

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpMethodsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpMethodsTest.java b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpMethodsTest.java
index a65371d..397618f 100644
--- a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpMethodsTest.java
+++ b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpMethodsTest.java
@@ -81,6 +81,18 @@ public class HttpMethodsTest extends BaseHttpTest {
 
         assertExchange(exchange);
     }
+    
+    @Test
+    public void httpGetWithUriParam() throws Exception {
+
+        Exchange exchange = template.request("http4://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/get?httpMethod=GET", new Processor() {
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(Exchange.HTTP_METHOD, "POST");
+            }
+        });
+
+        assertExchange(exchange);
+    }
 
     @Test
     public void httpPatch() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/c0b09137/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetAsUriParamTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetAsUriParamTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetAsUriParamTest.java
new file mode 100644
index 0000000..3043221
--- /dev/null
+++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetAsUriParamTest.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jetty.jettyproducer;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jetty.BaseJettyTest;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.http.common.HttpMessage;
+import org.junit.Test;
+
+/**
+ * Unit test to verify that we can have URI options for external system (endpoint is lenient)
+ */
+public class JettyHttpProducerGetAsUriParamTest extends BaseJettyTest {
+
+    private String serverUri = "jetty://http://localhost:" + getPort() + "/myservice?httpMethod=GET";
+    private MyParamsProcessor processor = new MyParamsProcessor();
+
+    @Test
+    public void testHttpGetWithParamsViaURI() throws Exception {
+        // these tests does not run well on Windows
+        if (isPlatform("windows")) {
+            return;
+        }
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Bye World");
+
+        // give Jetty time to startup properly
+        Thread.sleep(1000);
+
+        template.requestBody(serverUri, "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() throws Exception {
+                from(serverUri).process(processor).to("mock:result");
+            }
+        };
+    }
+
+    private static class MyParamsProcessor implements Processor {
+        public void process(Exchange exchange) throws Exception {
+            HttpMessage message = (HttpMessage)exchange.getIn();
+            assertNotNull(message.getRequest());
+
+            exchange.getOut().setBody("Bye World");
+            exchange.getOut().setHeader(Exchange.HTTP_METHOD, "POST");
+        }
+    }
+}
\ No newline at end of file


[2/4] camel git commit: CAMEL-10878: Fixed CS

Posted by ac...@apache.org.
CAMEL-10878: Fixed CS


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bc7c1529
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bc7c1529
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bc7c1529

Branch: refs/heads/master
Commit: bc7c152922be8e71bdaa5b8597bb9a645db76127
Parents: c0b0913
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Feb 23 13:21:36 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Feb 23 13:49:28 2017 +0100

----------------------------------------------------------------------
 .../apache/camel/http/common/HttpCommonEndpoint.java    | 12 ++++++------
 .../java/org/apache/camel/http/common/HttpHelper.java   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bc7c1529/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 0854085..69763b7 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -556,14 +556,14 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
         this.cookieHandler = cookieHandler;
     }
 
-	public String getHttpMethod() {
-		return httpMethod;
-	}
+    public String getHttpMethod() {
+        return httpMethod;
+    }
 
     /**
      * Configure the Http method to use
      */
-	public void setHttpMethod(String httpMethod) {
-		this.httpMethod = httpMethod;
-	}
+    public void setHttpMethod(String httpMethod) {
+        this.httpMethod = httpMethod;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/bc7c1529/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
index 8252063..c0b3e34 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
@@ -515,7 +515,7 @@ public final class HttpHelper {
         // compute what method to use either GET or POST
         HttpMethods answer;
         if (ObjectHelper.isNotEmpty(endpoint.getHttpMethod())) {
-        	answer = HttpMethods.valueOf(endpoint.getHttpMethod());
+            answer = HttpMethods.valueOf(endpoint.getHttpMethod());
         } else {
             HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
             if (m != null) {


[3/4] camel git commit: CAMEL-10878: Fixed CS and regen docs

Posted by ac...@apache.org.
CAMEL-10878: Fixed CS and regen docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9bab30ef
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9bab30ef
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9bab30ef

Branch: refs/heads/master
Commit: 9bab30ef3b3c38df1e530175847f1237fa41806a
Parents: bc7c152
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Feb 23 13:48:59 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Feb 23 13:49:28 2017 +0100

----------------------------------------------------------------------
 components/camel-http/src/main/docs/http-component.adoc         | 2 +-
 components/camel-http4/src/main/docs/http4-component.adoc       | 5 +++--
 .../apache/camel/component/http4/helper/HttpMethodHelper.java   | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9bab30ef/components/camel-http/src/main/docs/http-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc
index 5cc67ea..b0abe34 100644
--- a/components/camel-http/src/main/docs/http-component.adoc
+++ b/components/camel-http/src/main/docs/http-component.adoc
@@ -149,7 +149,6 @@ The HTTP component supports 27 endpoint options which are listed below:
 | Name | Group | Default | Java Type | Description
 | httpUri | producer |  | URI | *Required* The url of the HTTP endpoint to call.
 | disableStreamCache | common | false | boolean | Determines whether or not the raw input stream from Servlet is cached or not (Camel will read the stream into a in memory/overflow to file Stream caching) cache. By default Camel will cache the Servlet input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream such as streaming it directly to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option to improve performance in case you do not need to read the message payload multiple times. The http/http4 producer will by default cache the response body stream. If setting this option to true then the producers will not ca
 che the response body stream but use the response stream as-is as the message body.
-| httpMethod | common |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | authMethodPriority | producer |  | String | Authentication method for proxy either as Basic Digest or NTLM.
 | bridgeEndpoint | producer | false | boolean | If the option is true HttpProducer will ignore the Exchange.HTTP_URI header and use the endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let the HttpProducer send all the fault response back.
 | chunked | producer | true | boolean | If this option is false the Servlet will disable the HTTP streaming and set the content-length header on the response
@@ -158,6 +157,7 @@ The HTTP component supports 27 endpoint options which are listed below:
 | copyHeaders | producer | true | boolean | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false allows to only include the headers from the HTTP response (not propagating IN headers).
 | headerFilterStrategy | producer |  | HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message.
 | httpBinding | producer |  | HttpBinding | To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
+| httpMethod | producer |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | ignoreResponseBody | producer | false | boolean | If this option is true The http producer won't read response body and cache the input stream
 | okStatusCodeRange | producer | 200-299 | String | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.
 | preserveHostHeader | producer | false | boolean | If the option is true HttpProducer will set the Host header to the value contained in the current exchange Host header useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client this allows applications which use the Host header to generate accurate URL's for a proxied service

http://git-wip-us.apache.org/repos/asf/camel/blob/9bab30ef/components/camel-http4/src/main/docs/http4-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/docs/http4-component.adoc b/components/camel-http4/src/main/docs/http4-component.adoc
index 7c58fd7..dad818b 100644
--- a/components/camel-http4/src/main/docs/http4-component.adoc
+++ b/components/camel-http4/src/main/docs/http4-component.adoc
@@ -86,7 +86,7 @@ The HTTP4 component supports 13 options which are listed below.
 
 
 // endpoint options: START
-The HTTP4 component supports 32 endpoint options which are listed below:
+The HTTP4 component supports 33 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -105,6 +105,7 @@ The HTTP4 component supports 32 endpoint options which are listed below:
 | copyHeaders | producer | true | boolean | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false allows to only include the headers from the HTTP response (not propagating IN headers).
 | headerFilterStrategy | producer |  | HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message.
 | httpBinding | producer |  | HttpBinding | To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
+| httpMethod | producer |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | ignoreResponseBody | producer | false | boolean | If this option is true The http producer won't read response body and cache the input stream
 | okStatusCodeRange | producer | 200-299 | String | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.
 | preserveHostHeader | producer | false | boolean | If the option is true HttpProducer will set the Host header to the value contained in the current exchange Host header useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client this allows applications which use the Host header to generate accurate URL's for a proxied service
@@ -650,4 +651,4 @@ property.
    <property name="sslContextParameters" ref="sslContextParams2"/>
    <property name="x509HostnameVerifier" ref="hostnameVerifier"/>
 </bean>
-----------------------------------------------------------------------------
\ No newline at end of file
+----------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/camel/blob/9bab30ef/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
index 36714ae..a48ca03 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java
@@ -64,7 +64,7 @@ public final class HttpMethodHelper {
         // compute what method to use either GET or POST
         HttpMethods answer;
         if (ObjectHelper.isNotEmpty(endpoint.getHttpMethod())) {
-        	answer = HttpMethods.valueOf(endpoint.getHttpMethod());
+            answer = HttpMethods.valueOf(endpoint.getHttpMethod());
         } else {
             HttpMethods m = exchange.getIn().getHeader(Exchange.HTTP_METHOD, HttpMethods.class);
             if (m != null) {


[4/4] camel git commit: CAMEL-10878: Regen docs

Posted by ac...@apache.org.
CAMEL-10878: Regen docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f7a75746
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f7a75746
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f7a75746

Branch: refs/heads/master
Commit: f7a75746a07eefd2dffc858be09d55168eac212b
Parents: 9bab30e
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Feb 23 14:12:16 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Feb 23 14:15:10 2017 +0100

----------------------------------------------------------------------
 .../src/main/docs/atmosphere-websocket-component.adoc           | 5 +++--
 components/camel-jetty9/src/main/docs/jetty-component.adoc      | 5 +++--
 components/readme.adoc                                          | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f7a75746/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
index b5dfa16..3fdaee0 100644
--- a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
+++ b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
@@ -57,7 +57,7 @@ The Atmosphere Websocket component supports 7 options which are listed below.
 
 
 // endpoint options: START
-The Atmosphere Websocket component supports 36 endpoint options which are listed below:
+The Atmosphere Websocket component supports 37 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -88,6 +88,7 @@ The Atmosphere Websocket component supports 36 endpoint options which are listed
 | connectionClose | producer | false | boolean | Specifies whether a Connection Close header must be added to HTTP Request. By default connectionClose is false.
 | cookieHandler | producer |  | CookieHandler | Configure a cookie handler to maintain a HTTP session
 | copyHeaders | producer | true | boolean | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false allows to only include the headers from the HTTP response (not propagating IN headers).
+| httpMethod | producer |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | ignoreResponseBody | producer | false | boolean | If this option is true The http producer won't read response body and cache the input stream
 | okStatusCodeRange | producer | 200-299 | String | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.
 | preserveHostHeader | producer | false | boolean | If the option is true HttpProducer will set the Host header to the value contained in the current exchange Host header useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client this allows applications which use the Host header to generate accurate URL's for a proxied service
@@ -173,4 +174,4 @@ And the equivalent Spring sample:
 * link:servlet.html[SERVLET]
 * link:ahc-ws.html[AHC-WS]
 *
-https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=39621544[Websocket]
\ No newline at end of file
+https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=39621544[Websocket]

http://git-wip-us.apache.org/repos/asf/camel/blob/f7a75746/components/camel-jetty9/src/main/docs/jetty-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-jetty9/src/main/docs/jetty-component.adoc b/components/camel-jetty9/src/main/docs/jetty-component.adoc
index 1b50870..9b8d992 100644
--- a/components/camel-jetty9/src/main/docs/jetty-component.adoc
+++ b/components/camel-jetty9/src/main/docs/jetty-component.adoc
@@ -102,7 +102,7 @@ The Jetty 9 component supports 31 options which are listed below.
 
 
 // endpoint options: START
-The Jetty 9 component supports 54 endpoint options which are listed below:
+The Jetty 9 component supports 55 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -145,6 +145,7 @@ The Jetty 9 component supports 54 endpoint options which are listed below:
 | copyHeaders | producer | true | boolean | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false allows to only include the headers from the HTTP response (not propagating IN headers).
 | httpClientMaxThreads | producer | 254 | Integer | To set a value for maximum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to max 254 threads used in Jettys thread pool.
 | httpClientMinThreads | producer | 8 | Integer | To set a value for minimum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to min 8 threads used in Jettys thread pool.
+| httpMethod | producer |  | String | Configure the http Method to use as URI param. In case this is set it can't be overriden by the HttpMethod header.
 | ignoreResponseBody | producer | false | boolean | If this option is true The http producer won't read response body and cache the input stream
 | okStatusCodeRange | producer | 200-299 | String | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.
 | preserveHostHeader | producer | false | boolean | If the option is true HttpProducer will set the Host header to the value contained in the current exchange Host header useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client this allows applications which use the Host header to generate accurate URL's for a proxied service
@@ -719,4 +720,4 @@ name collisions when registering Jetty MBeans.
 * link:endpoint.html[Endpoint]
 * link:getting-started.html[Getting Started]
 
-* link:http.html[HTTP]
\ No newline at end of file
+* link:http.html[HTTP]

http://git-wip-us.apache.org/repos/asf/camel/blob/f7a75746/components/readme.adoc
----------------------------------------------------------------------
diff --git a/components/readme.adoc b/components/readme.adoc
index 7e2d51b..c8f62ce 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
 ^^^^^^^^^^
 
 // components: START
-Number of Components: 220
+Number of Components: 219
 
 [width="100%",cols="4,1,5",options="header"]
 |=======================================================================