borchero / Squid

Declarative and Reactive Networking for Swift.
https://squid.borchero.com
MIT License
71 stars 6 forks source link

Request headers not updating when retrying #6

Closed jedwardblack closed 4 years ago

jedwardblack commented 4 years ago

I am using the retrier and updating the stateful service that provides the accessToken & refreshToken values exactly as is shown in your example, but the retried request always uses the values from the original request, not the updated values.

Is there any way to change the header values before retrying the request?

borchero commented 4 years ago

The issue was that Future caches the value that it first returned so the request was not built again ... it is fixed now, I'll draft a new release shortly.