-
Notifications
You must be signed in to change notification settings - Fork 381
Get final redirected URL from response #293
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
Comments
I've made a pull request #321 . |
this is still a problem, I am having it right now. |
@clragon Unfortunately my pull request went unnoticed. I'm no longer working on this. If you really want to get this working, the best you can do is to fork the repo and patch it yourself. You can refer to my pull request; the modification is really trivial. |
How to get redirected url from http If a website abc.com redirects jkl.com and jkl.com redirects to xyz.com (Current website) How to get the current website url xyz.com from http package |
@Ronaldo7Messi10 did you find a solution yet? |
@yizhepku Can you please share the patch you prepared? The link to the pull request seems to be broken. |
Alas, I've long forgotten about this and have deleted my repo. The content of the patch is still viewable here. You may need to recreate the patch yourself. |
@yizhepku Thank you |
Closes #321, closes #623, closes #692 Fixes #293 Add a Uri field to BaseResponse with the final, potentially redirected, url for the content. The field is nullable for backwards compatibility - TODO: consider if this should be non-nullable from the start, or if it can be published nullable first and become non-nullable (and the constructor arg required) in the next breaking release. This may break tests which use bocks but do not mock the field used to read the URL.
When
followRedirects
is set totrue
for a GET request, there seems to be know way to know the final redirected URL.An issue that reports this: https://stackoverflow.com/questions/56861837/how-to-get-redirect-url-in-dart-flutter
The
request
package for Node.js provides a solution like this:https://stackoverflow.com/a/34600159/5987223
This would be useful when expanding a shortened link
The text was updated successfully, but these errors were encountered: