Methods |
public
|
send(RequestInterface $request, array $options = []): ResponseInterface
Send an HTTP request.
Parameters
$request |
Request to send
|
$options |
Request options to apply to the given
request and to the transfer.
|
Throws
|
#
|
public
|
sendAsync(RequestInterface $request, array $options = []): PromiseInterface
Asynchronously send an HTTP request.
Asynchronously send an HTTP request.
Parameters
$request |
Request to send
|
$options |
Request options to apply to the given
request and to the transfer.
|
|
#
|
public
|
request(string $method, string|UriInterface $uri, array $options = []): ResponseInterface
Create and send an HTTP request.
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
$method |
HTTP method.
|
$uri |
URI object or string.
|
$options |
Request options to apply.
|
Throws
|
#
|
public
|
requestAsync(string $method, string|UriInterface $uri, array $options = []): PromiseInterface
Create and send an asynchronous HTTP request.
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
$method |
HTTP method
|
$uri |
URI object or string.
|
$options |
Request options to apply.
|
|
#
|
public
|
getConfig(string|null $option = null): mixed
Get a client configuration option.
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.
Deprecated
ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
Parameters
$option |
The config option to retrieve.
|
|
#
|