Struct tower_http::follow_redirect::policy::Limited
source · pub struct Limited { /* private fields */ }
Available on crate feature
follow-redirect
only.Expand description
A redirection Policy
that limits the number of successive redirections.
Implementations§
Trait Implementations§
source§impl<B, E> Policy<B, E> for Limited
impl<B, E> Policy<B, E> for Limited
source§fn redirect(&mut self, _: &Attempt<'_>) -> Result<Action, E>
fn redirect(&mut self, _: &Attempt<'_>) -> Result<Action, E>
Invoked when the service received a response with a redirection status code (
3xx
). Read moresource§fn on_request(&mut self, _request: &mut Request<B>)
fn on_request(&mut self, _request: &mut Request<B>)
Invoked right before the service makes a request, regardless of whether it is redirected
or not. Read more