You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the most common usages for headers is authentication. However, if one provides a token as part of a header to this library, its value will remain the same forever, even through retries and whatnot. If at a given moment the token expires and needs to be refreshed, there will be no hope in reconnecting, so the retry mechanism becomes quite pointless.
I propose to allow passing "headers" in as a function, in which case it will be called every time fetch() is, in order to recompute the potential dynamic values in them.
The text was updated successfully, but these errors were encountered:
One of the most common usages for headers is authentication. However, if one provides a token as part of a header to this library, its value will remain the same forever, even through retries and whatnot. If at a given moment the token expires and needs to be refreshed, there will be no hope in reconnecting, so the retry mechanism becomes quite pointless.
I propose to allow passing "headers" in as a function, in which case it will be called every time
fetch()
is, in order to recompute the potential dynamic values in them.The text was updated successfully, but these errors were encountered: