Closed Christian-Athom closed 3 years ago
Which extra property did you actually need?
In this case the body contained the status code to check if the token is still valid
Well, that's the problem usually. You can only consume the body once. How did you work around this?
const clonedResponse = response.clone();
const body = await clonedResponse.json();
Brilliant!
If we pass the full response to the function, overrides have more flexibility on checking if tokens need to be refreshed, because API builders really like to deviate from the specifications.