While rare, there may be a case when the developer wishes to manually handle a redirected response.
The fetch api defines three values for the redirect option, "follow" (what request.js currently sets), "manual", and "error".
This change allows redirect to be passed as one of the options and will set the redirect option on the reqeust object. If not set, it will default to "follow" which is what the library currently does.
While rare, there may be a case when the developer wishes to manually handle a redirected response.
The fetch api defines three values for the
redirect
option, "follow" (what request.js currently sets), "manual", and "error".This change allows
redirect
to be passed as one of theoptions
and will set theredirect
option on the reqeust object. If not set, it will default to "follow" which is what the library currently does.