Copied!

Client interface for sending HTTP requests.

AbstractInterface
Constants
public GuzzleHttp\ClientInterface::MAJOR_VERSION = 7
 

The Guzzle major version.

Methods
public abstract getConfig(?string $option = NULL)
 

Get a client configuration option.

These options include default request options of the client, a "handler" (if utilized by the concrete client), and a "base_uri" if utilized by the concrete client.

  • param string|null $option The config option to retrieve.
  • return mixed
  • deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
public abstract request(string $method, $uri, array $options = []) : Psr\Http\Message\ResponseInterface
 

Create and send an HTTP request.

Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URL can contain the query string as well.

  • param string $method HTTP method.
  • param string|\UriInterface $uri URI object or string.
  • param array $options Request options to apply.
  • throws \GuzzleException
public abstract requestAsync(string $method, $uri, array $options = []) : GuzzleHttp\Promise\PromiseInterface
 

Create and send an asynchronous HTTP request.

Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URL can contain the query string as well. Use an array to provide a URL template and additional variables to use in the URL template expansion.

  • param string $method HTTP method
  • param string|\UriInterface $uri URI object or string.
  • param array $options Request options to apply.
public abstract send(Psr\Http\Message\RequestInterface $request, array $options = []) : Psr\Http\Message\ResponseInterface
 

Send an HTTP request.

  • param \RequestInterface $request Request to send
  • param array $options Request options to apply to the given request and to the transfer.
  • throws \GuzzleException
public abstract sendAsync(Psr\Http\Message\RequestInterface $request, array $options = []) : GuzzleHttp\Promise\PromiseInterface
 

Asynchronously send an HTTP request.

  • param \RequestInterface $request Request to send
  • param array $options Request options to apply to the given request and to the transfer.
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration