You are here

public function HandlerStack::setHandler in Zircon Profile 8

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

Set the HTTP handler that actually returns a promise.

Parameters

callable $handler Accepts a request and array of options and: returns a Promise.

File

vendor/guzzlehttp/guzzle/src/HandlerStack.php, line 108

Class

HandlerStack
Creates a composed Guzzle handler function by stacking middlewares on top of an HTTP handler function.

Namespace

GuzzleHttp

Code

public function setHandler(callable $handler) {
  $this->handler = $handler;
  $this->cached = null;
}