This repository was archived by the owner on May 21, 2022. It is now read-only.
[WIP] Initial implementation of following redirects #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is still work in progress, but sending over in case you want to have a look.
In short: I need to follow redirects. HTTPoison / hackney have options of
follow_redirectandmax_redirect. I think better names are "follow_redirects" and "max_redirects" so used these instead.The default behavior should be not to follow redirects, I think.
If you pass option of "follow_redirects: true", I think we should have some low
max_redirectsset, to something like3. This means up to 3 redirects will be followed before we error.The pull request so far implements the infinite redirects, there is no max_redirects option yet and no error handling, also has only basic tests.
Submitting for feedback if you have time to give me some, I'll probably work some more on this over weekend :)