camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Http4 Set Header Content-Type not passing through to the HTTP Request
Date Fri, 27 Jun 2014 13:57:33 GMT
I just checked the code of camel-http and camel-http4, it is not possible the set the content-type
header for the GET method. I suggest you to use the accept header instead.

Willem Jiang

Red Hat, Inc.
Blog: (English) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem

On June 27, 2014 at 9:30:11 PM, sandeepreddip ( wrote:
> I read the discussion at stack flow and would like to know how a GET request
> would be processed without content-type header with JAX-RS
> According to RFC 2616 Fielding
> The definition of *Accept *header for the media types which are acceptable
> for the response by the client
> *Content-Type* entity-header field indicates the media type of the
> *entity-body* sent to the recipient or, in the case of the HEAD method, the
> media type that would have been sent had the request been a GET.
> Looks like we indeed need a content-type header as part of GET.
> @Consumes maps to the Content-Type Header
> @Produces maps to the Accept Header
> http/http4 loses the Content-Type header in a GET. So, the request
> always fails. Is there a way to get around this? or for that matter is
> there a Camel component that solves it?
> *In my case the mime type is strictly tied to application/*+xml*
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message