camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siano, Stephan" <stephan.si...@sap.com>
Subject RE: Why is the set body not being returned?
Date Thu, 22 Sep 2016 12:00:40 GMT
Hi,

You probably should try to log the headers before you remove them. Maybe there is some redirect
header in the response from google (and your browser follows that overwriting your OK response).

Best regards
Stephan

-----Original Message-----
From: sim085 [mailto:sim085@hotmail.com] 
Sent: Donnerstag, 22. September 2016 13:35
To: users@camel.apache.org
Subject: Re: Why is the set body not being returned?

Hello again. It seems that it is something in the headers. I have added
".removeHeaders("*")" to the chain and now jetty is correctly returning the
set message through the "transform" call. 

i.e. this works - 

[code]
    	from("jetty:http://localhost:8080")
    	.transform(constant(""))
    	.setHeader(Exchange.HTTP_METHOD, constant("GET"))
		.to("jetty:http://www.google.com" + 
    			"?bridgeEndpoint=true" + 
    			"&throwExceptionOnFailure=false")
		.transform(constant("OK"))
    	.log("THE BODY IS ${body}")
    	.removeHeaders("*");
[/code]

I saw the code of the "transform" method and I saw how this seems to make a
copy of the old message and then update the body. This is why I tried to
clear the headers.

So is this normal?




--
View this message in context: http://camel.465427.n5.nabble.com/Why-is-the-set-body-not-being-returned-tp5787905p5787931.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message