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

net: allow controlling redirects #9007

Merged
merged 3 commits into from Mar 28, 2017

Conversation

Projects
None yet
4 participants
@deepak1556
Member

deepak1556 commented Mar 24, 2017

Introduces redirect mode option on net.request that takes one of follow, error, manual and defaults to follow. In manual mode a redirect event is emitted on the request object with statusCode, method, newURL, responseHeaders. Calling request.followRedirect will continue with the redirection in manual mode and request.abort to cancel the request.

Fixes #8868

@zeke

This comment has been minimized.

Show comment
Hide comment
@zeke

zeke Mar 24, 2017

Member

@deepak1556 does this need some user-facing documentation changes?

Member

zeke commented Mar 24, 2017

@deepak1556 does this need some user-facing documentation changes?

@deepak1556

This comment has been minimized.

Show comment
Hide comment
@deepak1556

deepak1556 Mar 25, 2017

Member

@zeke yup, have added the docs. Please take a look, thanks!

Member

deepak1556 commented Mar 25, 2017

@zeke yup, have added the docs. Please take a look, thanks!

@zeke

zeke approved these changes Mar 26, 2017

@deepak1556

This comment has been minimized.

Show comment
Hide comment
@deepak1556

deepak1556 Mar 27, 2017

Member

@arantes555 can you verify if this PR helps with your use case , thanks!

Member

deepak1556 commented Mar 27, 2017

@arantes555 can you verify if this PR helps with your use case , thanks!

@arantes555

This comment has been minimized.

Show comment
Hide comment
@arantes555

arantes555 Mar 28, 2017

@deepak1556 Looks good to me! Would be even better if it were possible to know whether or not a redirect happened in follow mode :) But hey, it's possible to do it manually.

arantes555 commented Mar 28, 2017

@deepak1556 Looks good to me! Would be even better if it were possible to know whether or not a redirect happened in follow mode :) But hey, it's possible to do it manually.

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Mar 28, 2017

Contributor

Looks good to me 👍 Thanks @deepak1556 🎆

Contributor

kevinsawicki commented Mar 28, 2017

Looks good to me 👍 Thanks @deepak1556 🎆

@kevinsawicki kevinsawicki merged commit 4441d55 into master Mar 28, 2017

6 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-mas-x64 Build #3740 succeeded in 8 min 16 sec
Details
electron-osx-x64 Build #3739 succeeded in 8 min 51 sec
Details
electron-win-ia32 Build #2741 succeeded in 8 min 26 sec
Details
electron-win-x64 Build #2715 succeeded in 8 min 22 sec
Details

@kevinsawicki kevinsawicki deleted the net_redirect_patch branch Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment