Cookie
7 months ago
Exception
7 months ago
Handler
7 months ago
BodySummarizer.php
7 months ago
BodySummarizerInterface.php
7 months ago
Client.php
7 months ago
ClientInterface.php
7 months ago
ClientTrait.php
7 months ago
HandlerStack.php
7 months ago
MessageFormatter.php
7 months ago
MessageFormatterInterface.php
7 months ago
Middleware.php
7 months ago
Pool.php
7 months ago
PrepareBodyMiddleware.php
7 months ago
RedirectMiddleware.php
7 months ago
RequestOptions.php
7 months ago
RetryMiddleware.php
7 months ago
TransferStats.php
7 months ago
Utils.php
7 months ago
functions.php
7 months ago
functions_include.php
7 months ago
ClientInterface.php
85 lines
| 1 | <?php |
| 2 | |
| 3 | namespace GuzzleHttp; |
| 4 | |
| 5 | use GuzzleHttp\Exception\GuzzleException; |
| 6 | use GuzzleHttp\Promise\PromiseInterface; |
| 7 | use Psr\Http\Message\RequestInterface; |
| 8 | use Psr\Http\Message\ResponseInterface; |
| 9 | use Psr\Http\Message\UriInterface; |
| 10 | |
| 11 | /** |
| 12 | * Client interface for sending HTTP requests. |
| 13 | */ |
| 14 | interface ClientInterface |
| 15 | { |
| 16 | /** |
| 17 | * The Guzzle major version. |
| 18 | */ |
| 19 | public const MAJOR_VERSION = 7; |
| 20 | |
| 21 | /** |
| 22 | * Send an HTTP request. |
| 23 | * |
| 24 | * @param RequestInterface $request Request to send |
| 25 | * @param array $options Request options to apply to the given |
| 26 | * request and to the transfer. |
| 27 | * |
| 28 | * @throws GuzzleException |
| 29 | */ |
| 30 | public function send(RequestInterface $request, array $options = []): ResponseInterface; |
| 31 | |
| 32 | /** |
| 33 | * Asynchronously send an HTTP request. |
| 34 | * |
| 35 | * @param RequestInterface $request Request to send |
| 36 | * @param array $options Request options to apply to the given |
| 37 | * request and to the transfer. |
| 38 | */ |
| 39 | public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface; |
| 40 | |
| 41 | /** |
| 42 | * Create and send an HTTP request. |
| 43 | * |
| 44 | * Use an absolute path to override the base path of the client, or a |
| 45 | * relative path to append to the base path of the client. The URL can |
| 46 | * contain the query string as well. |
| 47 | * |
| 48 | * @param string $method HTTP method. |
| 49 | * @param string|UriInterface $uri URI object or string. |
| 50 | * @param array $options Request options to apply. |
| 51 | * |
| 52 | * @throws GuzzleException |
| 53 | */ |
| 54 | public function request(string $method, $uri, array $options = []): ResponseInterface; |
| 55 | |
| 56 | /** |
| 57 | * Create and send an asynchronous HTTP request. |
| 58 | * |
| 59 | * Use an absolute path to override the base path of the client, or a |
| 60 | * relative path to append to the base path of the client. The URL can |
| 61 | * contain the query string as well. Use an array to provide a URL |
| 62 | * template and additional variables to use in the URL template expansion. |
| 63 | * |
| 64 | * @param string $method HTTP method |
| 65 | * @param string|UriInterface $uri URI object or string. |
| 66 | * @param array $options Request options to apply. |
| 67 | */ |
| 68 | public function requestAsync(string $method, $uri, array $options = []): PromiseInterface; |
| 69 | |
| 70 | /** |
| 71 | * Get a client configuration option. |
| 72 | * |
| 73 | * These options include default request options of the client, a "handler" |
| 74 | * (if utilized by the concrete client), and a "base_uri" if utilized by |
| 75 | * the concrete client. |
| 76 | * |
| 77 | * @param string|null $option The config option to retrieve. |
| 78 | * |
| 79 | * @return mixed |
| 80 | * |
| 81 | * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. |
| 82 | */ |
| 83 | public function getConfig(?string $option = null); |
| 84 | } |
| 85 |