How to check if a response is redirect response? #6074
-
Hi @sergiodxa, in your article https://sergiodxa.com/articles/throwing-vs-returning-responses-in-remix,
But how do we check if a response is a redirect response or not? |
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
Apr 15, 2023
Replies: 1 comment 1 reply
-
If you have a Response object check if status is a redirect one, and if the headers has the Location header, if both things are true the response is a redirect. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
juniorforlife
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a Response object check if status is a redirect one, and if the headers has the Location header, if both things are true the response is a redirect.