public static function create(callable
$handler = null
): self
{ $stack =
new self($handler ?: Utils::
chooseHandler());
$stack->
push(Middleware::
httpErrors(), 'http_errors'
);
$stack->
push(Middleware::
redirect(), 'allow_redirects'
);
$stack->
push(Middleware::
cookies(), 'cookies'
);
$stack->
push(Middleware::
prepareBody(), 'prepare_body'
);
return $stack;
} /**
* @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler.
*/
public function __construct(callable
$handler = null
) {