Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-07-07 Thread Willem Jiang
I just found camel-cxfrs can set the content-type even with get request. Maybe you can consider to use camel-cxfrs instead of camel-http4 component to that job. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chine

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread sandeepreddip
Well, I always had the *Accept header on the GET* Request. Please refer to my previous posts on the topic. I tried it directly from the route and from a processor as below, but both fail on a GET: *HttpHeaders.ACCEPT ="Accept"* *From a Route* from("timer:foo?period=1000").setHeader(Exchange.

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread Willem Jiang
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. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.ite

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread sandeepreddip
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 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html The definiti

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-26 Thread Willem Jiang
The content-type is part of request entity,  as there is no request entity body in the GET Http method, camel-http4 doesn’t put the Content-Type header into http header. Here a discussion[1] which is about it in stack overflow. [1]http://stackoverflow.com/questions/5661596/do-i-need-a-content-t

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-26 Thread sandeepreddip
Thanks for the reply,bit I'm a bit confused, I indeed set the headers on * Message message = exchange.getIn(); * *Attached is complete trace of the route. Camel_http4_GET_trace.txt * I appreciate if you could shed some mo

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-26 Thread kraythe .
You generally don't want to use the OUT part of the exchange except in very rare circumstances. I don't know why you felt the need to set the headers and information on the out part of the exchange but that is almost always an error. The rest of the route will continue processing the IN part of the

RE: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-26 Thread sandeepreddip
Hi, I'm facing the exact issue with an HTTP GET request. However it works fine with an HTTP POST. Camel version: 2.13.1 RESTFul services built with RESTEasy 2.3.6 Below are the logs for HTTP GET AND POST. *Enlightenment appreciated*. *HTTP POST ---FAILS -- Content-Type header is lost* The ser

RE: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-01-25 Thread E. A. English
Hi Ravi,Regarding your response below:The question is:Why does header Content-Type=application/jsonchange toContent-Type=text/xml???We need for "Content-Type=application/json" to be propragated to the response.It seems to be somehow filtered, or otherwise changed to "Content-Type=text/xml"./Y

RE: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-01-25 Thread E. A. English
Hi Ravi, Regarding your response below - The question is: Why does header Content-Type=application/json change to Content-Type=text/xml ??? We need for "Content-Type=application/json" to be propragated to the response. It seems to be somehow filtered, or otherwise changed t

RE: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-01-24 Thread alexey-s
Look http://camel.apache.org/http4.html Section: Message Headers. Aleksey -- View this message in context: http://camel.465427.n5.nabble.com/Http4-Set-Header-Content-Type-not-passing-through-to-the-HTTP-Request-tp5746414p5746464.html Sent from the Camel - Users mailing list archive at Nabble

RE: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-01-24 Thread Ravindra.Godbole
Your second logging will log headers from the response sent by the http4 invocation. I am able to see the values and these are not blanked out. Tried out with following path. from("timer://foo?fixedRate=true&delay=0&period=1000")