http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 120 forks source link

middleware: add Redirect #195

Closed Fishrock123 closed 4 years ago

Fishrock123 commented 4 years ago

Should work but isn't ideal. See code comments for details.

Implements https://github.com/http-rs/surf/issues/18

Fishrock123 commented 4 years ago

Should this be feature flagged?

passcod commented 4 years ago

Am I right in reading that this keep the same request method regardless of the status code? I don't think that's correct: 301/302 should redirect to GET instead.