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

net/http: Client get,post,postform ect funcs do not expose redirect urls #9517

Closed
epelc opened this issue Jan 6, 2015 · 2 comments
Closed

Comments

@epelc
Copy link

epelc commented Jan 6, 2015

Currently net/http's client Get Post PostForm and other functions do not expose any redirect urls they followed. This forces you to craft your own request and use Do even if you just need to follow a single url and know what it is you followed.

@bradfitz
Copy link
Contributor

bradfitz commented Jan 6, 2015

If you need such information, you can use the CheckRedirect hook of http://golang.org/pkg/net/http/#Client

We try to keep the simple things simple.

And obviously we can't change the signature of existing APIs due to the Go 1 API compatibility promise.

@bradfitz bradfitz closed this as completed Jan 6, 2015
@epelc
Copy link
Author

epelc commented Jan 6, 2015

@bradfitz Thanks I also just found that and was about to comment

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants