I use HTTP provider in Angular 2 for data loading from API.
return this.http.post(url, urlSearchParams.toString(), {
headers: this.getHttpHeaders()
})
.retryWhen((error) => {
return this.handleRetryError(error);
})
When there is no or old session I create new one in this.handleRetryError(error) and fill headers with it. (method getHttpHeaders() returns array with headers)
RetryWhen tries to do this post again, but there is unchanged (old) headers from first round.
Is there any chance to change headers parameter for http.post from .readyWhen?
Thank you very much for help :)