Documentation describes that HTTP redirects are followed by default.
Running the example code from docs.rs page for awc outputs HTTP code 301 instead of following the redirect and getting to 200.
rustc -V): rustc 1.44.1 (c7087fe00 2020-06-17)contradicts docs here: https://docs.rs/awc/2.0.0/awc/struct.ClientBuilder.html#method.disable_redirects
I havent the foggiest idea where the builder methods are from for redirects because they do nothing at all and there is no hint of a redirect system anywhere in the client code. Whatsmore, it not possible to support redirections with the existing constructs without breaking changes. Will look into how a larger set of changes would impact the crate.
Needless to say, this is no longer a "good first issue" unless the task is to remove the redirect claims from the docs and deprecate the builder methods.
I have been trying to add redirection with no success (I'm somewhat of a Rust newbie, btw). I'll pause that to work on removing the references to redirect from docs and submit a PR soon.
I'm still willing to add support for redirects, though. I just will need some guidance. Would anyone help me here? I may need some mentoring regarding the borrow checker, futures and all.
@thiagoarrais Yes, we'd much prefer to actually have the feature. I'd be happy to mentor this feature. I'm considering this issue the tracking issue for the feature.
Feel free to put up a draft PR if you'd like, so we can see what's happening as you make progress. If you have questions I'm active in the Gitter chat.
Some notes based research I've done so far:
It would be great to have this feature, thank you for the progress guys!
Most helpful comment
@thiagoarrais Yes, we'd much prefer to actually have the feature. I'd be happy to mentor this feature. I'm considering this issue the tracking issue for the feature.
Feel free to put up a draft PR if you'd like, so we can see what's happening as you make progress. If you have questions I'm active in the Gitter chat.