Module tower_http::follow_redirect::policy[][src]

This is supported on crate feature follow-redirect only.
Expand description

Tools for customizing the behavior of a FollowRedirect middleware.

Structs

And

A redirection Policy that combines the results of two Policys.

Attempt

A type that holds information on a redirection attempt.

CloneBodyFn

A redirection Policy created from a closure.

FilterCredentials

A redirection Policy that removes credentials from requests in redirections.

Limited

A redirection Policy that limits the number of successive redirections.

Or

A redirection Policy that combines the results of two Policys.

RedirectFn

A redirection Policy created from a closure.

SameOrigin

A redirection Policy that stops cross-origin redirections.

Enums

Action

A value returned by Policy::redirect which indicates the action FollowRedirect should take for a redirection response.

Traits

Policy

Trait for the policy on handling redirection responses.

PolicyExt

An extension trait for Policy that provides additional adapters.

Functions

clone_body_fn

Create a new redirection Policy from a closure F: Fn(&B) -> Option<B>.

redirect_fn

Create a new redirection Policy from a closure F: FnMut(&Attempt<'_>) -> Result<Action, E>.

Type Definitions

Standard

A redirection Policy with a reasonable set of standard behavior.