Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow redirect value to be configurable #25

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

t27duck
Copy link
Contributor

@t27duck t27duck commented Jul 3, 2021

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.

@marcelolx marcelolx merged commit fb4fcb5 into rails:main Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants