[ Index ]

PHP Cross Reference of phpBB-3.3.12-deutsch

title

Body

[close]

/vendor/guzzlehttp/guzzle/src/ -> Client.php (summary)

(no description)

File Size: 501 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Client:: (13 methods):
  __construct()
  __call()
  sendAsync()
  send()
  requestAsync()
  request()
  getConfig()
  buildUri()
  configureDefaults()
  prepareDefaults()
  transfer()
  applyOptions()
  invalidBody()


Class: Client  - X-Ref


__construct(array $config = [])   X-Ref
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 = new Client([
'base_uri'        => 'http://www.foo.com/1.0/',
'timeout'         => 0,
'allow_redirects' => false,
'proxy'           => '192.168.16.1:10'
]);

Client configuration settings include the following options:

- handler: (callable) Function that transfers HTTP requests over the
wire. The function is called with a Psr7\Http\Message\RequestInterface
and array of transfer options, and must return a
GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
Psr7\Http\Message\ResponseInterface on success.
If no handler is provided, a default handler will be created
that enables all of the request options below by attaching all of the
default middleware to the handler.
- base_uri: (string|UriInterface) Base URI of the client that is merged
into relative URIs. Can be a string or instance of UriInterface.
- **: any request option

param: array $config Client configuration settings.

__call($method, $args)   X-Ref

return: Promise\PromiseInterface
param: string $method
param: array  $args

sendAsync(RequestInterface $request, array $options = [])   X-Ref
Asynchronously send an HTTP request.

return: Promise\PromiseInterface
param: array $options Request options to apply to the given

send(RequestInterface $request, array $options = [])   X-Ref
Send an HTTP request.

return: ResponseInterface
param: array $options Request options to apply to the given

requestAsync($method, $uri = '', array $options = [])   X-Ref
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.

return: Promise\PromiseInterface
param: string              $method  HTTP method
param: string|UriInterface $uri     URI object or string.
param: array               $options Request options to apply. See \GuzzleHttp\RequestOptions.

request($method, $uri = '', array $options = [])   X-Ref
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.

return: ResponseInterface
param: string              $method  HTTP method.
param: string|UriInterface $uri     URI object or string.
param: array               $options Request options to apply. See \GuzzleHttp\RequestOptions.

getConfig($option = null)   X-Ref
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.

return: mixed
param: string|null $option The config option to retrieve.

buildUri($uri, array $config)   X-Ref

return: UriInterface
param: string|null $uri

configureDefaults(array $config)   X-Ref
Configures the default options for a client.

return: void
param: array $config

prepareDefaults(array $options)   X-Ref
Merges default options into the array.

return: array
param: array $options Options to modify by reference

transfer(RequestInterface $request, array $options)   X-Ref
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.

return: Promise\PromiseInterface
param: array $options See \GuzzleHttp\RequestOptions.

applyOptions(RequestInterface $request, array &$options)   X-Ref
Applies the array of request options to a request.

return: RequestInterface
param: RequestInterface $request
param: array            $options

invalidBody()   X-Ref
Throw Exception with pre-set message.

return: void



Generated: Sun Jun 23 12:25:44 2024 Cross-referenced by PHPXref 0.7.1