Request redirect middleware.
Apply this middleware like other middleware using {@see \GuzzleHttp\Middleware::redirect()}.
- final
CloneableInstantiable
Constants |
public GuzzleHttp |
public GuzzleHttp |
Properties |
public static $defaultSettings = ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => false, 'referer' => false, 'track_redirects' => false]
|
Methods |
public __construct(callable $nextHandler)
|
public __invoke(Psr\Http\Message\RequestInterface $request, array $options) : GuzzleHttp |
public checkRedirect(Psr\Http\Message\RequestInterface $request, array $options, Psr\Http\Message\ResponseInterface $response)
|
public modifyRequest(Psr\Http\Message\RequestInterface $request, array $options, Psr\Http\Message\ResponseInterface $response) : Psr\Http\Message\RequestInterface |
Properties |
private $nextHandler = NULL
|
Methods |
private guardMax(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, array $options) : void Check for too many redirects.
|
private static redirectUri(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, array $protocols) : Psr\Http\Message\UriInterface Set the appropriate URL on the request based on the location header. |
private withTracking(GuzzleHttp Enable tracking on promise. |
Properties |
public static $defaultSettings = ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => false, 'referer' => false, 'track_redirects' => false]
|
Methods |
private static redirectUri(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, array $protocols) : Psr\Http\Message\UriInterface Set the appropriate URL on the request based on the location header. |