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

Add support for effective url #143

Closed
egeloen opened this issue Aug 12, 2014 · 2 comments · Fixed by #144
Closed

Add support for effective url #143

egeloen opened this issue Aug 12, 2014 · 2 comments · Fixed by #144

Comments

@egeloen
Copy link
Contributor

egeloen commented Aug 12, 2014

Hey!

I would like to get access to the effective url in case of a one or multiple 302 redirects. The issue is this information is lost in the middle when you parse/normalize headers as you only get the last one which represents the final headers of the request and so make unavailable the location header. curl allows to retrieve it with curl_getinfo($curl, CURLINFO_EFFECTIVE_URL) but I'm not sure how you would like to populate it in the response. Would you prefer to add a new constructor argument or set the property after the response have been instantiated? Obviously, I will provide a PR if you give the way you would like to use.

ping @nategood

@nategood
Copy link
Owner

Hi @egeloen

I might actually be in favor of a fourth optional meta_data argument to the constructor that includes info from curl_getinfo – and at some point potentially additional meta data. We could start by then having a generic meta data accessor method to retrieve additional information about the req/res process.

@egeloen
Copy link
Contributor Author

egeloen commented Aug 20, 2014

Okay, thx for the feedback!

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 a pull request may close this issue.

2 participants