You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Don Doffe <fo...@gmail.com> on 2011/06/17 07:56:06 UTC

Some grief with HTTP + Exchange.ACCEPT_CONTENT_TYPE

Hi,

I just started playing with Camel - I have an option to use it for upcoming
project. 
I might miss something or there is an issue with getting custom "Accept"
http header across.

Here is my route builder:

from("servlet:///reporting")
    		.removeHeader(Exchange.HTTP_URI)
    		.removeHeader(Exchange.ACCEPT_CONTENT_TYPE)
    		.setHeader(Exchange.ACCEPT_CONTENT_TYPE,constant("text/plain"))
    		.to("http://localhost:7890/dim/response.xml");


Everything apart from the Accept header is there.
Do I miss something? 

Could you please help me?

--
View this message in context: http://camel.465427.n5.nabble.com/Some-grief-with-HTTP-Exchange-ACCEPT-CONTENT-TYPE-tp4497742p4497742.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Some grief with HTTP + Exchange.ACCEPT_CONTENT_TYPE

Posted by Don Doffe <fo...@gmail.com>.
I think I found the issue. My understanding was that
Exchange.ACCEPT_CONTENT_TYPE maps to HTTP header Accept. 

I was wrong. Exchange.ACCEPT_CONTENT_TYPE has nothing to do with it and I
have to set it (HTTP Accept header) manually.

--
View this message in context: http://camel.465427.n5.nabble.com/Some-grief-with-HTTP-Exchange-ACCEPT-CONTENT-TYPE-tp4497742p4498063.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Some grief with HTTP + Exchange.ACCEPT_CONTENT_TYPE

Posted by Willem Jiang <wi...@gmail.com>.
Hi

What's the error did you get?
Can you past the stack trace to help us to trace the issue ?

On 6/17/11 1:56 PM, Don Doffe wrote:
> Hi,
>
> I just started playing with Camel - I have an option to use it for upcoming
> project.
> I might miss something or there is an issue with getting custom "Accept"
> http header across.
>
> Here is my route builder:
>
> from("servlet:///reporting")
>      		.removeHeader(Exchange.HTTP_URI)
>      		.removeHeader(Exchange.ACCEPT_CONTENT_TYPE)
>      		.setHeader(Exchange.ACCEPT_CONTENT_TYPE,constant("text/plain"))
>      		.to("http://localhost:7890/dim/response.xml");
>
>
> Everything apart from the Accept header is there.
> Do I miss something?
>
> Could you please help me?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Some-grief-with-HTTP-Exchange-ACCEPT-CONTENT-TYPE-tp4497742p4497742.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang