You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Richard Slide <ri...@gmail.com> on 2010/07/28 15:49:25 UTC
Add some HTTP header to HttpProduce
Hello all,
I need to add the following header to my http request:
"myaddress"
"from"
"to"
"transaction-set"
and change the http protocol version from http 1.1 to http .1.0
My route builder looks like this
from(senderUri).setHeader(Exchange.HTTP_METHOD,
constant(org.apache.camel.component.http.HttpMethods.POST)).to(
receiverUri);
where senderUri is file end point receiver is http end point
thanks for help
--Richard
Re: Add some HTTP header to HttpProduce
Posted by Claus Ibsen <cl...@gmail.com>.
You can just use the setHeader to see those headers
.setHeader("myaddress", constant("Some address"))
.setHeader("from", constant("Someone))
On Wed, Jul 28, 2010 at 3:49 PM, Richard Slide <ri...@gmail.com> wrote:
> Hello all,
> I need to add the following header to my http request:
>
> "myaddress"
> "from"
> "to"
> "transaction-set"
>
>
> and change the http protocol version from http 1.1 to http .1.0
>
>
> My route builder looks like this
>
> from(senderUri).setHeader(Exchange.HTTP_METHOD,
> constant(org.apache.camel.component.http.HttpMethods.POST)).to(
> receiverUri);
>
>
>
> where senderUri is file end point receiver is http end point
>
>
> thanks for help
>
>
> --Richard
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Add some HTTP header to HttpProduce
Posted by Filippo Balicchia <fi...@gmail.com>.
ok thanks,
but is possibile to put some costum headers ?
for example
"transaction-set" ?
cheers
2010/7/28 Willem Jiang <wi...@gmail.com>:
> Richard Slide wrote:
>>
>> Hello all,
>> I need to add the following header to my http request:
>>
>> "myaddress"
>> "from"
>> "to"
>> "transaction-set"
>>
> You can put these header into the message header and HttpProducer will take
> care of them.
>>
>> and change the http protocol version from http 1.1 to http .1.0
>>
> I don't think we can change the http protocol version as camel doesn't
> provide a way to set it.
> Please feel free to log a JIRA for it.
>
>>
>> My route builder looks like this
>>
>> from(senderUri).setHeader(Exchange.HTTP_METHOD,
>> constant(org.apache.camel.component.http.HttpMethods.POST)).to(
>> receiverUri);
>>
>>
>>
>> where senderUri is file end point receiver is http end point
>>
>>
>> thanks for help
>>
>>
>> --Richard
>>
>
> Willem
> ----------------------------------
> Apache Camel, Apache CXF committer
> Open Source Integration http://www.fusesource.com
> Blog http://willemjiang.blogspot.com
> Tiwtter http://twitter.com/willemjiang
>
Re: Add some HTTP header to HttpProduce
Posted by Willem Jiang <wi...@gmail.com>.
Richard Slide wrote:
> Hello all,
> I need to add the following header to my http request:
>
> "myaddress"
> "from"
> "to"
> "transaction-set"
>
You can put these header into the message header and HttpProducer will
take care of them.
>
> and change the http protocol version from http 1.1 to http .1.0
>
I don't think we can change the http protocol version as camel doesn't
provide a way to set it.
Please feel free to log a JIRA for it.
>
> My route builder looks like this
>
> from(senderUri).setHeader(Exchange.HTTP_METHOD,
> constant(org.apache.camel.component.http.HttpMethods.POST)).to(
> receiverUri);
>
>
>
> where senderUri is file end point receiver is http end point
>
>
> thanks for help
>
>
> --Richard
>
Willem
----------------------------------
Apache Camel, Apache CXF committer
Open Source Integration http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang