Open wolfv opened 5 months ago
I think reqwest
already supported it, ref: https://docs.rs/reqwest/latest/reqwest/redirect/struct.Policy.html
You can check redirect tests https://github.com/seanmonstar/reqwest/blob/master/src/redirect.rs#L259
It seems like it wouldn't be too hard to add. It it worth the additional storage?
Maybe it's something that could be enabled / disabled on the client or request level? I think the storage cost is negligible for 99% of 30x redirects (just a few headers, maybe a bit of content).
The Python requests library has a "redirect history" feature. That can be useful to get access to previous headers, or other response data that was sent along with a 30x status code. Here are the Python docs: https://requests.readthedocs.io/en/latest/user/quickstart/#redirection-and-history
Would you be open such a feature in
reqwest
?Thanks for this wonderful library, by the way!