Security update to Drupal 8.4.6
[yaffs-website] / vendor / guzzlehttp / guzzle / src / ClientInterface.php
1 <?php
2 namespace GuzzleHttp;
3
4 use GuzzleHttp\Promise\PromiseInterface;
5 use GuzzleHttp\Exception\GuzzleException;
6 use Psr\Http\Message\RequestInterface;
7 use Psr\Http\Message\ResponseInterface;
8 use Psr\Http\Message\UriInterface;
9
10 /**
11  * Client interface for sending HTTP requests.
12  */
13 interface ClientInterface
14 {
15     const VERSION = '6.3.2';
16
17     /**
18      * Send an HTTP request.
19      *
20      * @param RequestInterface $request Request to send
21      * @param array            $options Request options to apply to the given
22      *                                  request and to the transfer.
23      *
24      * @return ResponseInterface
25      * @throws GuzzleException
26      */
27     public function send(RequestInterface $request, array $options = []);
28
29     /**
30      * Asynchronously send an HTTP request.
31      *
32      * @param RequestInterface $request Request to send
33      * @param array            $options Request options to apply to the given
34      *                                  request and to the transfer.
35      *
36      * @return PromiseInterface
37      */
38     public function sendAsync(RequestInterface $request, array $options = []);
39
40     /**
41      * Create and send an HTTP request.
42      *
43      * Use an absolute path to override the base path of the client, or a
44      * relative path to append to the base path of the client. The URL can
45      * contain the query string as well.
46      *
47      * @param string              $method  HTTP method.
48      * @param string|UriInterface $uri     URI object or string.
49      * @param array               $options Request options to apply.
50      *
51      * @return ResponseInterface
52      * @throws GuzzleException
53      */
54     public function request($method, $uri, array $options = []);
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      * @return PromiseInterface
69      */
70     public function requestAsync($method, $uri, array $options = []);
71
72     /**
73      * Get a client configuration option.
74      *
75      * These options include default request options of the client, a "handler"
76      * (if utilized by the concrete client), and a "base_uri" if utilized by
77      * the concrete client.
78      *
79      * @param string|null $option The config option to retrieve.
80      *
81      * @return mixed
82      */
83     public function getConfig($option = null);
84 }