Documentation

RedirectMiddleware
in package

Request redirect middleware.

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

Table of Contents

HISTORY_HEADER  = 'X-Guzzle-Redirect-History'
STATUS_HISTORY_HEADER  = 'X-Guzzle-Redirect-Status-History'
$defaultSettings  : mixed
$nextHandler  : callable
__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 mixed $defaultSettings = ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => false, 'referer' => false, 'track_redirects' => false]

Methods

__construct()

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

Next handler to invoke.

Return values
mixed

Search results