ky
ky copied to clipboard
beforeRequest hook called after beforeRetry
Please verify if this is the correct flow or not I was not expecting "beforeRequest "to be called again after "beforeRetry", my use case is that I refresh the token and set the Authorization header in "beforeRetry "but it gets overridden by "beforeRequest".
thanks in advance.
I think this is expected behavior. It's called for every single request with no exception. A retry is a request. We should clearly point that out in the docs, however.
Maybe the request could somehow indicate that it's a request caused by a retry.
Got it thanks for your response
No need to close. There are unresolved tasks here.