Copied!

HTTP handler that uses PHP's HTTP stream wrapper.

  • final
CloneableInstantiable
Methods
public __invoke(Psr\Http\Message\RequestInterface $request, array $options) : GuzzleHttp\Promise\PromiseInterface
 

Sends an HTTP request.

  • param \RequestInterface $request Request to send.
  • param array $options Request transfer options.
Properties
private $lastHeaders = []
 
  • var array
Methods
private add_cert(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_crypto_method(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_debug(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_progress(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_proxy(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_timeout(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private add_verify(Psr\Http\Message\RequestInterface $request, array $options, $value, array $params) : void
 
  • param mixed $value as passed via Request transfer options.
private static addNotification(array $params, callable $notify) : void
private static callArray(array $functions) : callable
private checkDecode(array $options, array $headers, $stream) : array
 
  • param resource $stream
private createResource(callable $callback)
 

Create a resource and check to ensure it was created successfully

  • param callable $callback Callable that returns stream resource
  • return resource
  • throws \RuntimeException on error
private createResponse(Psr\Http\Message\RequestInterface $request, array $options, $stream, ?float $startTime) : GuzzleHttp\Promise\PromiseInterface
 
  • param resource $stream
private createSink(Psr\Http\Message\StreamInterface $stream, array $options) : Psr\Http\Message\StreamInterface
private createStream(Psr\Http\Message\RequestInterface $request, array $options)
 
  • return resource
private drain(Psr\Http\Message\StreamInterface $source, Psr\Http\Message\StreamInterface $sink, string $contentLength) : Psr\Http\Message\StreamInterface
 

Drains the source stream into the "sink" client option.

  • param string $contentLength Header specifying the amount of data to read.
  • throws \RuntimeException when the sink option is invalid.
private getDefaultContext(Psr\Http\Message\RequestInterface $request) : array
private invokeStats(array $options, Psr\Http\Message\RequestInterface $request, ?float $startTime, ?Psr\Http\Message\ResponseInterface $response = NULL, ?Throwable $error = NULL) : void
private parse_proxy(string $url) : array
 

Parses the given proxy URL to make it compatible with the format PHP's stream context expects.

private resolveHost(Psr\Http\Message\RequestInterface $request, array $options) : Psr\Http\Message\UriInterface
Methods
private static addNotification(array $params, callable $notify) : void
private static callArray(array $functions) : callable
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration