Retrieve header from response during redirecttion process of tRESTClient
Hello,
I have a problem to connect to Microsoft Sharepoint online...with Talend.
To connect to sharepoint, you need to realize a sequence of REST call. A little schema below to explain...
I try to do this in Talend but I have a problem in step 3... During this step, there is a redirection with some cookie set during the redirection process.
I use the tRESTClient to make the call.
I have to scenario : First, I set "Follow redirects" in advance settings. The call fails because during the redirection process the tRESTClient receive some cookie but the component don't set the cookie for the next call, thus impossible to finish the step 3.
Second, I don't set "Follow redirects" in advance settings. In this case, my idea is to make the redirection process in the job and set "manually" the cookie. But the call fails with an exception "Redirection Exception" and thus impossible to access HTTP headers.
Thus, it's impossible for me to continue...
How I can "force" the tRESTClient to continue in case of a HTTP Code 302 ?
Is there a Talend component which permit to acces the HTTP header in all case (success or fail) ? I know that HTTP headers are visble in tRESTClient but only after a success call.