HTTP handler that uses PHP's HTTP stream wrapper.

CloneableInstantiable
Methods
public __invoke(Psr\Http\Message\RequestInterface $request, array $options)
 

Sends an HTTP request.

  • return PromiseInterface
Properties
private $lastHeaders
Methods
private add_cert(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private add_debug(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private add_progress(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private add_proxy(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private add_timeout(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private add_verify(Psr\Http\Message\RequestInterface $request, $options, $value, $params)
private addNotification(array $params, callable $notify)
private callArray(array $functions)
private checkDecode(array $options, array $headers, $stream)
private createResource(callable $callback)
 

Create a resource and check to ensure it was created successfully

  • return resource
  • throws RuntimeException on error
private createResponse(Psr\Http\Message\RequestInterface $request, array $options, $stream, $startTime)
private createSink(Psr\Http\Message\StreamInterface $stream, array $options)
private createStream(Psr\Http\Message\RequestInterface $request, array $options)
private drain(Psr\Http\Message\StreamInterface $source, Psr\Http\Message\StreamInterface $sink, $contentLength)
 

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

  • return StreamInterface
  • throws RuntimeException when the sink option is invalid.
private getDefaultContext(Psr\Http\Message\RequestInterface $request)
private invokeStats(array $options, Psr\Http\Message\RequestInterface $request, $startTime, ?Psr\Http\Message\ResponseInterface $response = NULL, $error = NULL)
private resolveHost(Psr\Http\Message\RequestInterface $request, array $options)
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only