How to get rid of the HTTP 302 "redirect" code in cHTTP ?

Seven Stars

How to get rid of the HTTP 302 "redirect" code in cHTTP ?



We need to contact an HTTP server (in POST method) to receive some information. This server is an oAth2 authentication server and replies with a 302 Redirect HTTP code.

This throws an exception in our route.

I tried to handle this exception with a cTry/catch but the exchange body is empty and does not contain the http response body.

I tried to had some extra Apache parameters to the url such as "httpClient.handleRedirects=true" but they're not recognized.


How can we handle HTTP redirects in route ?


Thank you



Re: How to get rid of the HTTP 302 "redirect" code in cHTTP ?


Could you please post your current route setting screenshots into forum which will be helpful for us to address your issue?

Thanks for your time.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: How to get rid of the HTTP 302 "redirect" code in cHTTP ?

I would also need an answer to this.


So the 302 is the EXPECTED response from an external API. And the code I need to parse is in the response/redirect URL.


How to process 302 correctly with Talend?



Starting job < name... > at 23:50 03/04/2018.

[statistics] connecting to socket on port 3922

[statistics] connected

objc[10745]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

Exception in component tRESTClient_1 (<... .>) HTTP 302 Found

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

at java.lang.reflect.Constructor.newInstance(

at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(

at org.apache.cxf.jaxrs.client.WebClient.doInvoke(

at org.apache.cxf.jaxrs.client.WebClient.doInvoke(

at org.apache.cxf.jaxrs.client.WebClient.invoke(


at <..>

ended at 23:50 03/04/2018. [exit code=1]f




@rhall_2_0 any tips for this?