Documentation

RedirectMiddleware
in package

Request redirect middleware.

Apply this middleware like other middleware using Middleware::redirect().

Tags
final

Table of Contents

HISTORY_HEADER  = 'X-Guzzle-Redirect-History'
STATUS_HISTORY_HEADER  = 'X-Guzzle-Redirect-Status-History'
$defaultSettings  : array<string|int, mixed>
$nextHandler  : mixed
__construct()  : mixed
__invoke()  : PromiseInterface
checkRedirect()  : ResponseInterface|PromiseInterface
modifyRequest()  : RequestInterface
guardMax()  : void
Check for too many redirects.
redirectUri()  : UriInterface
Set the appropriate URL on the request based on the location header.
withTracking()  : PromiseInterface
Enable tracking on promise.

Constants

STATUS_HISTORY_HEADER

public mixed STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History'

Properties

$defaultSettings

public static array<string|int, mixed> $defaultSettings = ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => false, 'referer' => false, 'track_redirects' => false]

$nextHandler

private mixed $nextHandler

callable(RequestInterface, array): PromiseInterface

Methods

__construct()

public __construct(callable $nextHandler) : mixed
Parameters
$nextHandler : callable
Return values
mixed

Search results