Module policy
Tools for customizing the behavior of a [FollowRedirect][super::FollowRedirect] middleware.
Structs
-
And
A redirection
Policythat combines the results of twoPolicys. - Attempt A type that holds information on a redirection attempt.
-
CloneBodyFn
A redirection
Policycreated from a closure. -
FilterCredentials
A redirection
Policythat removes credentials from requests in redirections. -
Limited
A redirection
Policythat limits the number of successive redirections. -
Or
A redirection
Policythat combines the results of twoPolicys. -
RedirectFn
A redirection
Policycreated from a closure. -
SameOrigin
A redirection
Policythat stops cross-origin redirections.
Enums
-
Action
A value returned by
Policy::redirectwhich indicates the action [FollowRedirect][super::FollowRedirect] should take for a redirection response.
Traits
Functions
-
clone_body_fn
Create a new redirection
Policyfrom a closureF: Fn(&B) -> Option<B>. -
redirect_fn
Create a new redirection
Policyfrom a closureF: FnMut(&Attempt<'_>) -> Result<Action, E>.