Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
GuzzleHttp\ClientInterface Interface Reference
Inheritance diagram for GuzzleHttp\ClientInterface:
GuzzleHttp\Client core\http_client

Public Member Functions

 getConfig (?string $option=null)
 Get a client configuration option.
 
 request (string $method, $uri, array $options=[])
 Create and send an HTTP request.
 
 requestAsync (string $method, $uri, array $options=[])
 Create and send an asynchronous HTTP request.
 
 send (RequestInterface $request, array $options=[])
 Send an HTTP request.
 
 sendAsync (RequestInterface $request, array $options=[])
 Asynchronously send an HTTP request.
 

Public Attributes

const MAJOR_VERSION = 7
 The Guzzle major version.
 

Member Function Documentation

◆ getConfig()

GuzzleHttp\ClientInterface::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.

Parameters
string | null$optionThe config option to retrieve.
Return values
mixed
Deprecated
ClientInterface\getConfig will be removed in guzzlehttp/guzzle:8.0.

Implemented in GuzzleHttp\Client.

◆ request()

GuzzleHttp\ClientInterface::request ( string $method,
$uri,
array $options = [] )

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.

Parameters
string$methodHTTP method.
string | UriInterface$uriURI object or string.
array$optionsRequest options to apply.
Exceptions
GuzzleException

Implemented in GuzzleHttp\Client.

◆ requestAsync()

GuzzleHttp\ClientInterface::requestAsync ( string $method,
$uri,
array $options = [] )

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.

Parameters
string$methodHTTP method
string | UriInterface$uriURI object or string.
array$optionsRequest options to apply.

Implemented in GuzzleHttp\Client.

◆ send()

GuzzleHttp\ClientInterface::send ( RequestInterface $request,
array $options = [] )

Send an HTTP request.

Parameters
RequestInterface$requestRequest to send
array$optionsRequest options to apply to the given request and to the transfer.
Exceptions
GuzzleException

Implemented in GuzzleHttp\Client.

◆ sendAsync()

GuzzleHttp\ClientInterface::sendAsync ( RequestInterface $request,
array $options = [] )

Asynchronously send an HTTP request.

Parameters
RequestInterface$requestRequest to send
array$optionsRequest options to apply to the given request and to the transfer.

Implemented in GuzzleHttp\Client.


The documentation for this interface was generated from the following file: