camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 01/06: Added Set Header EIP to docs
Date Mon, 05 Mar 2018 09:09:48 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cc4be348a81d79fb22de2cfb254d279abfd2c5c4
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Mon Mar 5 09:57:02 2018 +0100

    Added Set Header EIP to docs
---
 camel-core/src/main/docs/eips/setHeader-eip.adoc | 47 ++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/camel-core/src/main/docs/eips/setHeader-eip.adoc b/camel-core/src/main/docs/eips/setHeader-eip.adoc
new file mode 100644
index 0000000..a7092ed
--- /dev/null
+++ b/camel-core/src/main/docs/eips/setHeader-eip.adoc
@@ -0,0 +1,47 @@
+[[setHeader-eip]]
+== Set Header EIP
+
+The SetHeader EIP allows you to set the body of your exchange.
+
+=== Options
+
+// eip options: START
+The Set Header EIP supports 1 options which are listed below:
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *headerName* | *Required* Name of message header to set a new value The simple language
can be used to define a dynamic evaluated header name to be used. Otherwise a constant name
will be used. |  | String
+|===
+// eip options: END
+
+=== Examples
+
+The following example shows how to use the SetProperty EIP
+
+[source,java]
+----
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+        from("direct:a")
+            .setHeader("myHeader", constant("test"))
+            .to("direct:b");
+    }
+};
+----
+
+
+And the same example using XML:
+
+[source,xml]
+----
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+    <route>
+        <from uri="direct:a"/>
+        <setProperty headerName="myHeader">
+            <constant>test</constant>
+        </setProperty>
+        <to uri="direct:b"/>
+    </route>
+</camelContext>
+----

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

Mime
View raw message