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

Change redirect method in `beforeRedirect` #248

Closed
delaguilaluis opened this issue Apr 25, 2019 · 2 comments
Closed

Change redirect method in `beforeRedirect` #248

delaguilaluis opened this issue Apr 25, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@delaguilaluis
Copy link
Contributor

@delaguilaluis delaguilaluis commented Apr 25, 2019

Hi! Since Wreck 11, 301 and 302 HTTP code redirects would be issued with the same method than the original request. I want to change the method from POST to GET, but I wasn't able to do it through the beforeRedirect function in Wreck's options. I know beforeRedirect allows you to change the request options by changing its requestOptions parameter, but that set of options does not include method or uri.

Before detecting a redirect (probably using the redirected function), and then manually issuing a new request with the method I desire, I would like to know if I'm missing any configuration/method in Wreck than would allow me to say "I want 301 redirects method to be changed to GET" (as in Wreck < 11).

Thanks!

@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Apr 25, 2019

What changed in version 11 that broke this capability?

@delaguilaluis

This comment has been minimized.

Copy link
Contributor Author

@delaguilaluis delaguilaluis commented Apr 25, 2019

What changed is that methods of a redirected request (301 and 302) no longer change to GET(consequence of solving the issue #138), which happens to be what I need. I don't think the capability to change the method of a redirect existed before.

@hueniverse hueniverse added the request label May 18, 2019
@hueniverse hueniverse self-assigned this Sep 18, 2019
@hueniverse hueniverse added this to the 15.1.0 milestone Sep 18, 2019
@Marsup Marsup added feature and removed request labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.