PluginProbe ʕ •ᴥ•ʔ
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 25.9
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v25.9
27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 19.1 19.10 19.11 19.12 19.13 19.14 19.2 19.3 19.4 19.5 19.5.1 19.6 19.6.1 19.7 19.7.1 19.7.2 19.8 19.9 20.0 20.1 20.10 20.11 20.12 20.13 20.2 20.2.1 20.3 20.4 20.5 20.6 20.7 20.8 20.9 21.0 21.1 21.2 21.3 21.4 21.5 21.6 21.7 21.8 21.8.1 21.9 21.9.1 22.0 22.1 22.2 22.3 22.4 22.5 22.6 22.7 22.8 22.9 23.0 23.1 23.2 23.3 23.4 23.5 23.6 23.7 23.8 23.9 24.0 24.1 24.2 24.3 24.4 24.5 24.6 24.7 24.8 24.8.1 24.9 25.0 25.1 25.2 25.3 25.3.1 25.4 25.5 25.6 25.7 25.8 25.9 26.0 26.1 26.1.1 26.2 26.3 26.4 26.5 26.6 26.7 26.8 26.9 27.0 27.1 27.1.1 27.2 27.3 27.4
wordpress-seo / vendor_prefixed / guzzlehttp / guzzle / src / ClientTrait.php
wordpress-seo / vendor_prefixed / guzzlehttp / guzzle / src Last commit date
Cookie 2 years ago Exception 2 years ago Handler 2 years ago BodySummarizer.php 2 years ago BodySummarizerInterface.php 2 years ago Client.php 2 years ago ClientInterface.php 2 years ago ClientTrait.php 2 years ago HandlerStack.php 2 years ago MessageFormatter.php 2 years ago MessageFormatterInterface.php 2 years ago Middleware.php 2 years ago Pool.php 2 years ago PrepareBodyMiddleware.php 2 years ago RedirectMiddleware.php 2 years ago RequestOptions.php 2 years ago RetryMiddleware.php 2 years ago TransferStats.php 2 years ago Utils.php 2 years ago functions.php 2 years ago functions_include.php 2 years ago
ClientTrait.php
228 lines
1 <?php
2
3 namespace YoastSEO_Vendor\GuzzleHttp;
4
5 use YoastSEO_Vendor\GuzzleHttp\Exception\GuzzleException;
6 use YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface;
7 use YoastSEO_Vendor\Psr\Http\Message\ResponseInterface;
8 use YoastSEO_Vendor\Psr\Http\Message\UriInterface;
9 /**
10 * Client interface for sending HTTP requests.
11 */
12 trait ClientTrait
13 {
14 /**
15 * Create and send an HTTP request.
16 *
17 * Use an absolute path to override the base path of the client, or a
18 * relative path to append to the base path of the client. The URL can
19 * contain the query string as well.
20 *
21 * @param string $method HTTP method.
22 * @param string|UriInterface $uri URI object or string.
23 * @param array $options Request options to apply.
24 *
25 * @throws GuzzleException
26 */
27 public abstract function request(string $method, $uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface;
28 /**
29 * Create and send an HTTP GET request.
30 *
31 * Use an absolute path to override the base path of the client, or a
32 * relative path to append to the base path of the client. The URL can
33 * contain the query string as well.
34 *
35 * @param string|UriInterface $uri URI object or string.
36 * @param array $options Request options to apply.
37 *
38 * @throws GuzzleException
39 */
40 public function get($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
41 {
42 return $this->request('GET', $uri, $options);
43 }
44 /**
45 * Create and send an HTTP HEAD request.
46 *
47 * Use an absolute path to override the base path of the client, or a
48 * relative path to append to the base path of the client. The URL can
49 * contain the query string as well.
50 *
51 * @param string|UriInterface $uri URI object or string.
52 * @param array $options Request options to apply.
53 *
54 * @throws GuzzleException
55 */
56 public function head($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
57 {
58 return $this->request('HEAD', $uri, $options);
59 }
60 /**
61 * Create and send an HTTP PUT request.
62 *
63 * Use an absolute path to override the base path of the client, or a
64 * relative path to append to the base path of the client. The URL can
65 * contain the query string as well.
66 *
67 * @param string|UriInterface $uri URI object or string.
68 * @param array $options Request options to apply.
69 *
70 * @throws GuzzleException
71 */
72 public function put($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
73 {
74 return $this->request('PUT', $uri, $options);
75 }
76 /**
77 * Create and send an HTTP POST request.
78 *
79 * Use an absolute path to override the base path of the client, or a
80 * relative path to append to the base path of the client. The URL can
81 * contain the query string as well.
82 *
83 * @param string|UriInterface $uri URI object or string.
84 * @param array $options Request options to apply.
85 *
86 * @throws GuzzleException
87 */
88 public function post($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
89 {
90 return $this->request('POST', $uri, $options);
91 }
92 /**
93 * Create and send an HTTP PATCH request.
94 *
95 * Use an absolute path to override the base path of the client, or a
96 * relative path to append to the base path of the client. The URL can
97 * contain the query string as well.
98 *
99 * @param string|UriInterface $uri URI object or string.
100 * @param array $options Request options to apply.
101 *
102 * @throws GuzzleException
103 */
104 public function patch($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
105 {
106 return $this->request('PATCH', $uri, $options);
107 }
108 /**
109 * Create and send an HTTP DELETE request.
110 *
111 * Use an absolute path to override the base path of the client, or a
112 * relative path to append to the base path of the client. The URL can
113 * contain the query string as well.
114 *
115 * @param string|UriInterface $uri URI object or string.
116 * @param array $options Request options to apply.
117 *
118 * @throws GuzzleException
119 */
120 public function delete($uri, array $options = []) : \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
121 {
122 return $this->request('DELETE', $uri, $options);
123 }
124 /**
125 * Create and send an asynchronous HTTP request.
126 *
127 * Use an absolute path to override the base path of the client, or a
128 * relative path to append to the base path of the client. The URL can
129 * contain the query string as well. Use an array to provide a URL
130 * template and additional variables to use in the URL template expansion.
131 *
132 * @param string $method HTTP method
133 * @param string|UriInterface $uri URI object or string.
134 * @param array $options Request options to apply.
135 */
136 public abstract function requestAsync(string $method, $uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface;
137 /**
138 * Create and send an asynchronous HTTP GET request.
139 *
140 * Use an absolute path to override the base path of the client, or a
141 * relative path to append to the base path of the client. The URL can
142 * contain the query string as well. Use an array to provide a URL
143 * template and additional variables to use in the URL template expansion.
144 *
145 * @param string|UriInterface $uri URI object or string.
146 * @param array $options Request options to apply.
147 */
148 public function getAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
149 {
150 return $this->requestAsync('GET', $uri, $options);
151 }
152 /**
153 * Create and send an asynchronous HTTP HEAD request.
154 *
155 * Use an absolute path to override the base path of the client, or a
156 * relative path to append to the base path of the client. The URL can
157 * contain the query string as well. Use an array to provide a URL
158 * template and additional variables to use in the URL template expansion.
159 *
160 * @param string|UriInterface $uri URI object or string.
161 * @param array $options Request options to apply.
162 */
163 public function headAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
164 {
165 return $this->requestAsync('HEAD', $uri, $options);
166 }
167 /**
168 * Create and send an asynchronous HTTP PUT request.
169 *
170 * Use an absolute path to override the base path of the client, or a
171 * relative path to append to the base path of the client. The URL can
172 * contain the query string as well. Use an array to provide a URL
173 * template and additional variables to use in the URL template expansion.
174 *
175 * @param string|UriInterface $uri URI object or string.
176 * @param array $options Request options to apply.
177 */
178 public function putAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
179 {
180 return $this->requestAsync('PUT', $uri, $options);
181 }
182 /**
183 * Create and send an asynchronous HTTP POST request.
184 *
185 * Use an absolute path to override the base path of the client, or a
186 * relative path to append to the base path of the client. The URL can
187 * contain the query string as well. Use an array to provide a URL
188 * template and additional variables to use in the URL template expansion.
189 *
190 * @param string|UriInterface $uri URI object or string.
191 * @param array $options Request options to apply.
192 */
193 public function postAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
194 {
195 return $this->requestAsync('POST', $uri, $options);
196 }
197 /**
198 * Create and send an asynchronous HTTP PATCH request.
199 *
200 * Use an absolute path to override the base path of the client, or a
201 * relative path to append to the base path of the client. The URL can
202 * contain the query string as well. Use an array to provide a URL
203 * template and additional variables to use in the URL template expansion.
204 *
205 * @param string|UriInterface $uri URI object or string.
206 * @param array $options Request options to apply.
207 */
208 public function patchAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
209 {
210 return $this->requestAsync('PATCH', $uri, $options);
211 }
212 /**
213 * Create and send an asynchronous HTTP DELETE request.
214 *
215 * Use an absolute path to override the base path of the client, or a
216 * relative path to append to the base path of the client. The URL can
217 * contain the query string as well. Use an array to provide a URL
218 * template and additional variables to use in the URL template expansion.
219 *
220 * @param string|UriInterface $uri URI object or string.
221 * @param array $options Request options to apply.
222 */
223 public function deleteAsync($uri, array $options = []) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
224 {
225 return $this->requestAsync('DELETE', $uri, $options);
226 }
227 }
228