You are here

public static function Middleware::redirect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Middleware.php \GuzzleHttp\Middleware::redirect()

Middleware that handles request redirects.

Return value

callable Returns a function that accepts the next handler.

1 call to Middleware::redirect()
HandlerStack::create in vendor/guzzlehttp/guzzle/src/HandlerStack.php
Creates a default handler stack that can be used by clients.

File

vendor/guzzlehttp/guzzle/src/Middleware.php, line 145

Class

Middleware
Functions used to create and wrap handlers with handler middleware.

Namespace

GuzzleHttp

Code

public static function redirect() {
  return function (callable $handler) {
    return new RedirectMiddleware($handler);
  };
}