Status always 200 on redirect. #764
Unanswered
adrian-kriegel
asked this question in
Q&A
Replies: 1 comment
-
@adrian-kriegel The fetch spec dictates that redirects should reuse the original method and body to query the new resource and return the response as-is. For example, the following (adapted from your reproduction steps) will return status 404:
If you visit https://google.com/404 in your browser, you'll also see that you'll get a 404. If you want to check that a request was redirected, use the
If you want node-fetch (or any relatively spec-compliant fetch library) not to follow redirects, set the redirect mode to
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
I think the title is self-explanatory. Status appears to be 200 in any case.
Reproduction steps
Jest example:Beta Was this translation helpful? Give feedback.
All reactions