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

Pass final redirect url to callback #220

Closed
wants to merge 7 commits into from
Closed

Pass final redirect url to callback #220

wants to merge 7 commits into from

Conversation

ashishgandhi
Copy link

Useful if you need to know the final URL where the redirect ends. Use case for this is when you have logic/rules based on domain name of a page.

Ashish Gandhi added 6 commits March 28, 2012 16:05
Signed-off-by: Ashish Gandhi <ag@ashonomics.com>
Signed-off-by: Ashish Gandhi <ag@ashonomics.com>
Signed-off-by: Ashish Gandhi <ag@ashonomics.com>
@ashishgandhi
Copy link
Author

Edited pull request text to make is less confusing.

@mikeal
Copy link
Member

mikeal commented Apr 8, 2012

you can already get this. there are two ways.

var r = require(url, function (e, resp) {
  r.uri
  resp.request.uri
})

@mikeal mikeal closed this Apr 8, 2012
@ashishgandhi
Copy link
Author

Yes, why not. My changes were unnecessary.

@dandv
Copy link
Contributor

dandv commented Apr 16, 2014

@mikeal: I was looking for the official way to get the final URL too.

  1. "require" should be "request" in your last comment, right?
  2. How "official" is resp.request.href to get resp.request.uri.href? (i.e. is it guaranteed to always be the same?)

@bradvogel
Copy link

@mikeal Also curious about above comment

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 this pull request may close these issues.

None yet

4 participants