kollapsminoriteten/wp-content/plugins/google-site-kit/third-party/guzzlehttp/guzzle/src/ClientInterface.php

83 lines
3.1 KiB
PHP
Raw Normal View History

2022-12-15 17:34:08 +01:00
<?php
namespace Google\Site_Kit_Dependencies\GuzzleHttp;
2023-04-26 17:39:43 +02:00
use Google\Site_Kit_Dependencies\GuzzleHttp\Exception\GuzzleException;
use Google\Site_Kit_Dependencies\GuzzleHttp\Promise\PromiseInterface;
use Google\Site_Kit_Dependencies\Psr\Http\Message\RequestInterface;
use Google\Site_Kit_Dependencies\Psr\Http\Message\ResponseInterface;
use Google\Site_Kit_Dependencies\Psr\Http\Message\UriInterface;
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Client interface for sending HTTP requests.
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
interface ClientInterface
2022-12-15 17:34:08 +01:00
{
/**
2023-04-26 17:39:43 +02:00
* @deprecated Will be removed in Guzzle 7.0.0
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
const VERSION = '6.5.5';
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Send an HTTP request.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @param RequestInterface $request Request to send
* @param array $options Request options to apply to the given
* request and to the transfer.
2022-12-15 17:34:08 +01:00
*
* @return ResponseInterface
2023-04-26 17:39:43 +02:00
* @throws GuzzleException
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
public function send(\Google\Site_Kit_Dependencies\Psr\Http\Message\RequestInterface $request, array $options = []);
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Asynchronously send an HTTP request.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @param RequestInterface $request Request to send
* @param array $options Request options to apply to the given
* request and to the transfer.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @return PromiseInterface
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
public function sendAsync(\Google\Site_Kit_Dependencies\Psr\Http\Message\RequestInterface $request, array $options = []);
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Create and send an HTTP request.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* 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.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @param string $method HTTP method.
* @param string|UriInterface $uri URI object or string.
* @param array $options Request options to apply.
2022-12-15 17:34:08 +01:00
*
* @return ResponseInterface
2023-04-26 17:39:43 +02:00
* @throws GuzzleException
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
public function request($method, $uri, array $options = []);
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Create and send an asynchronous HTTP request.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* 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.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @param string $method HTTP method
* @param string|UriInterface $uri URI object or string.
* @param array $options Request options to apply.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @return PromiseInterface
2022-12-15 17:34:08 +01:00
*/
2023-04-26 17:39:43 +02:00
public function requestAsync($method, $uri, array $options = []);
2022-12-15 17:34:08 +01:00
/**
2023-04-26 17:39:43 +02:00
* Get a client configuration option.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* 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.
2022-12-15 17:34:08 +01:00
*
2023-04-26 17:39:43 +02:00
* @param string|null $option The config option to retrieve.
2022-12-15 17:34:08 +01:00
*
* @return mixed
*/
2023-04-26 17:39:43 +02:00
public function getConfig($option = null);
2022-12-15 17:34:08 +01:00
}