Documentation

RedirectMiddleware
in package

Request redirect middleware.

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

Tags
final

Table of Contents

Constants

HISTORY_HEADER  = 'X-Guzzle-Redirect-History'
STATUS_HISTORY_HEADER  = 'X-Guzzle-Redirect-Status-History'

Properties

$defaultSettings  : array<string|int, mixed>
$nextHandler  : callable(RequestInterface, array<string|int, mixed>): PromiseInterface

Methods

__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]

Methods


        
On this page

Search results