- final
- Implements
GuzzleHttp \ClientInterface Psr\Http\Client\ClientInterface - Traits
| Constants |
| Methods |
public __call( $method, $args)
|
| public __construct(array $config = []) Clients accept an array of constructor parameters. Here's an example of creating a client using a base_uri and an array of default request options to apply to each request:
Client configuration settings include the following options:
|
| public delete( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP DELETE 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.
|
| public deleteAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP DELETE 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.
|
| public get( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP GET 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.
|
| public getAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP GET 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.
|
| public 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.
|
| public head( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP HEAD 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.
|
| public headAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP HEAD 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.
|
| public patch( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP PATCH 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.
|
| public patchAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP PATCH 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.
|
| public post( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP POST 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.
|
| public postAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP POST 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.
|
| public put( $uri, array $options = []) : Psr\Http\Message\ResponseInterface Create and send an HTTP PUT 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.
|
| public putAsync( $uri, array $options = []) : GuzzleHttp Create and send an asynchronous HTTP PUT 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.
|
| public 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.
|
| public requestAsync(string $method, $uri = '', array $options = []) : GuzzleHttp 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.
|
| public send(Psr\Http\Message\RequestInterface $request, array $options = []) : Psr\Http\Message\ResponseInterface Send an HTTP request.
|
| public sendAsync(Psr\Http\Message\RequestInterface $request, array $options = []) : GuzzleHttp Asynchronously send an HTTP request.
|
| public sendRequest(Psr\Http\Message\RequestInterface $request) : Psr\Http\Message\ResponseInterface The HttpClient PSR (PSR-18) specify this method. |
| Properties |
private $config = NULL
|
| Methods |
| private applyOptions(Psr\Http\Message\RequestInterface $request, array $options) : Psr\Http\Message\RequestInterface Applies the array of request options to a request. |
| private buildUri(Psr\Http\Message\UriInterface $uri, array $config) : Psr\Http\Message\UriInterface |
| private configureDefaults(array $config) : void Configures the default options for a client. |
| private invalidBody() : GuzzleHttp Return an InvalidArgumentException with pre-set message. |
| private prepareDefaults(array $options) : array Merges default options into the array.
|
| private transfer(Psr\Http\Message\RequestInterface $request, array $options) : GuzzleHttp Transfers the given request and applies request options. The URI of the request is not modified and the request options are used as-is without merging in default options.
|