undici
undici copied to clipboard
feat: onRedirect
@szmarczak started a bit in case you want to have a try a it. I think it's mostly the test missing.
I wonder if it would be ok to include this.history
, statusCode
and headers
as well.
-
this.history
can be used to detect infinite loops -
statusCode
&headers
- for handling300 Multiple Choices
maybe onRedirect
should be able to "short-circuit" the redirection (e.g. by returning false
)?