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
I'm trying to create a middleware that retries a request when it returns a 401 status code. I've already created a functional version that refreshes tokens and can retry GET requests. However, I'm unable to access the POST request body within the onResponse function. My goal is to update a header and retry the request. Is there a built-in way to achieve this? 🤔
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to create a middleware that retries a request when it returns a 401 status code. I've already created a functional version that refreshes tokens and can retry GET requests. However, I'm unable to access the POST request body within the
onResponse
function. My goal is to update a header and retry the request. Is there a built-in way to achieve this? 🤔Beta Was this translation helpful? Give feedback.
All reactions