tower-http
tower-http copied to clipboard
follow_redirect: expose previous and next request methods
This augments follow-redirect Attempt in order to expose two relevant HTTP methods during redirects:
- the method for the original/previous request
- the method to be performed on the next request upon following a redirection
This allows consumers to write policies based on both previous and next requests methods.
For context:
- This is a re-spin of https://github.com/seanmonstar/reqwest/pull/2430
- The original usecase is described in https://github.com/seanmonstar/reqwest/issues/1777#issuecomment-2363279906