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

Get intermediate redirect urls #234

Closed
rightaway opened this issue Oct 25, 2016 · 2 comments
Closed

Get intermediate redirect urls #234

rightaway opened this issue Oct 25, 2016 · 2 comments
Labels
enhancement This change will extend Got features ✭ help wanted ✭

Comments

@rightaway
Copy link

It would be useful if there were a way to get all redirected urls in a request. So if you request url a, but it redirects to b which redirects to c and finally to d, if there were a urls property on the response that would return ['a', 'b', 'c', 'd']. There's the redirect event that could be used to capture these urls but that seems to only work when using streams.

@floatdrop
Copy link
Contributor

I saw nice trick in aggregate-error – we can make url an iterable with toString method that get last url. But this will be surprising for some people, I guess.

@floatdrop floatdrop added the enhancement This change will extend Got features label Nov 1, 2016
@sindresorhus
Copy link
Owner

Let's go the explicit route with a urls property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This change will extend Got features ✭ help wanted ✭
Projects
None yet
Development

No branches or pull requests

3 participants