tower-http icon indicating copy to clipboard operation
tower-http copied to clipboard

follow_redirect: expose previous and next request methods

Open lucab opened this issue 8 months ago • 1 comments

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.

lucab avatar Apr 17 '25 14:04 lucab

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

lucab avatar Apr 17 '25 14:04 lucab