PluginProbe ʕ •ᴥ•ʔ
Check & Log Email – Easy Email Testing & Mail logging / 2.0.15
Check & Log Email – Easy Email Testing & Mail logging v2.0.15
2.0.15 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 2.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.13.1 2.0.13.2 2.0.14 2.0.2 2.0.3 2.0.4 2.0.5 2.0.5.1 2.0.6 2.0.7 2.0.8 2.0.9 trunk 0.5.7 0.6.0 0.6.1 0.6.2 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.12.1 1.0.13 1.0.13.1 1.0.2 1.0.3
check-email / vendor / guzzlehttp / guzzle / src / ClientTrait.php
check-email / vendor / guzzlehttp / guzzle / src Last commit date
Cookie 1 week ago Exception 1 week ago Handler 1 week ago BodySummarizer.php 1 week ago BodySummarizerInterface.php 1 week ago Client.php 1 week ago ClientInterface.php 1 week ago ClientTrait.php 1 week ago HandlerStack.php 1 week ago MessageFormatter.php 1 week ago MessageFormatterInterface.php 1 week ago Middleware.php 1 week ago Pool.php 1 week ago PrepareBodyMiddleware.php 1 week ago RedirectMiddleware.php 1 week ago RequestOptions.php 1 week ago RetryMiddleware.php 1 week ago TransferStats.php 1 week ago Utils.php 1 week ago functions.php 1 week ago functions_include.php 1 week ago
ClientTrait.php
242 lines
1 <?php
2
3 namespace GuzzleHttp;
4
5 use GuzzleHttp\Exception\GuzzleException;
6 use GuzzleHttp\Promise\PromiseInterface;
7 use Psr\Http\Message\ResponseInterface;
8 use Psr\Http\Message\UriInterface;
9
10 /**
11 * Client interface for sending HTTP requests.
12 */
13 trait ClientTrait
14 {
15 /**
16 * Create and send an HTTP request.
17 *
18 * Use an absolute path to override the base path of the client, or a
19 * relative path to append to the base path of the client. The URL can
20 * contain the query string as well.
21 *
22 * @param string $method HTTP method.
23 * @param string|UriInterface $uri URI object or string.
24 * @param array $options Request options to apply.
25 *
26 * @throws GuzzleException
27 */
28 abstract public function request(string $method, $uri, array $options = []): ResponseInterface;
29
30 /**
31 * Create and send an HTTP GET request.
32 *
33 * Use an absolute path to override the base path of the client, or a
34 * relative path to append to the base path of the client. The URL can
35 * contain the query string as well.
36 *
37 * @param string|UriInterface $uri URI object or string.
38 * @param array $options Request options to apply.
39 *
40 * @throws GuzzleException
41 */
42 public function get($uri, array $options = []): ResponseInterface
43 {
44 return $this->request('GET', $uri, $options);
45 }
46
47 /**
48 * Create and send an HTTP HEAD request.
49 *
50 * Use an absolute path to override the base path of the client, or a
51 * relative path to append to the base path of the client. The URL can
52 * contain the query string as well.
53 *
54 * @param string|UriInterface $uri URI object or string.
55 * @param array $options Request options to apply.
56 *
57 * @throws GuzzleException
58 */
59 public function head($uri, array $options = []): ResponseInterface
60 {
61 return $this->request('HEAD', $uri, $options);
62 }
63
64 /**
65 * Create and send an HTTP PUT request.
66 *
67 * Use an absolute path to override the base path of the client, or a
68 * relative path to append to the base path of the client. The URL can
69 * contain the query string as well.
70 *
71 * @param string|UriInterface $uri URI object or string.
72 * @param array $options Request options to apply.
73 *
74 * @throws GuzzleException
75 */
76 public function put($uri, array $options = []): ResponseInterface
77 {
78 return $this->request('PUT', $uri, $options);
79 }
80
81 /**
82 * Create and send an HTTP POST request.
83 *
84 * Use an absolute path to override the base path of the client, or a
85 * relative path to append to the base path of the client. The URL can
86 * contain the query string as well.
87 *
88 * @param string|UriInterface $uri URI object or string.
89 * @param array $options Request options to apply.
90 *
91 * @throws GuzzleException
92 */
93 public function post($uri, array $options = []): ResponseInterface
94 {
95 return $this->request('POST', $uri, $options);
96 }
97
98 /**
99 * Create and send an HTTP PATCH request.
100 *
101 * Use an absolute path to override the base path of the client, or a
102 * relative path to append to the base path of the client. The URL can
103 * contain the query string as well.
104 *
105 * @param string|UriInterface $uri URI object or string.
106 * @param array $options Request options to apply.
107 *
108 * @throws GuzzleException
109 */
110 public function patch($uri, array $options = []): ResponseInterface
111 {
112 return $this->request('PATCH', $uri, $options);
113 }
114
115 /**
116 * Create and send an HTTP DELETE request.
117 *
118 * Use an absolute path to override the base path of the client, or a
119 * relative path to append to the base path of the client. The URL can
120 * contain the query string as well.
121 *
122 * @param string|UriInterface $uri URI object or string.
123 * @param array $options Request options to apply.
124 *
125 * @throws GuzzleException
126 */
127 public function delete($uri, array $options = []): ResponseInterface
128 {
129 return $this->request('DELETE', $uri, $options);
130 }
131
132 /**
133 * Create and send an asynchronous HTTP request.
134 *
135 * Use an absolute path to override the base path of the client, or a
136 * relative path to append to the base path of the client. The URL can
137 * contain the query string as well. Use an array to provide a URL
138 * template and additional variables to use in the URL template expansion.
139 *
140 * @param string $method HTTP method
141 * @param string|UriInterface $uri URI object or string.
142 * @param array $options Request options to apply.
143 */
144 abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
145
146 /**
147 * Create and send an asynchronous HTTP GET request.
148 *
149 * Use an absolute path to override the base path of the client, or a
150 * relative path to append to the base path of the client. The URL can
151 * contain the query string as well. Use an array to provide a URL
152 * template and additional variables to use in the URL template expansion.
153 *
154 * @param string|UriInterface $uri URI object or string.
155 * @param array $options Request options to apply.
156 */
157 public function getAsync($uri, array $options = []): PromiseInterface
158 {
159 return $this->requestAsync('GET', $uri, $options);
160 }
161
162 /**
163 * Create and send an asynchronous HTTP HEAD request.
164 *
165 * Use an absolute path to override the base path of the client, or a
166 * relative path to append to the base path of the client. The URL can
167 * contain the query string as well. Use an array to provide a URL
168 * template and additional variables to use in the URL template expansion.
169 *
170 * @param string|UriInterface $uri URI object or string.
171 * @param array $options Request options to apply.
172 */
173 public function headAsync($uri, array $options = []): PromiseInterface
174 {
175 return $this->requestAsync('HEAD', $uri, $options);
176 }
177
178 /**
179 * Create and send an asynchronous HTTP PUT request.
180 *
181 * Use an absolute path to override the base path of the client, or a
182 * relative path to append to the base path of the client. The URL can
183 * contain the query string as well. Use an array to provide a URL
184 * template and additional variables to use in the URL template expansion.
185 *
186 * @param string|UriInterface $uri URI object or string.
187 * @param array $options Request options to apply.
188 */
189 public function putAsync($uri, array $options = []): PromiseInterface
190 {
191 return $this->requestAsync('PUT', $uri, $options);
192 }
193
194 /**
195 * Create and send an asynchronous HTTP POST request.
196 *
197 * Use an absolute path to override the base path of the client, or a
198 * relative path to append to the base path of the client. The URL can
199 * contain the query string as well. Use an array to provide a URL
200 * template and additional variables to use in the URL template expansion.
201 *
202 * @param string|UriInterface $uri URI object or string.
203 * @param array $options Request options to apply.
204 */
205 public function postAsync($uri, array $options = []): PromiseInterface
206 {
207 return $this->requestAsync('POST', $uri, $options);
208 }
209
210 /**
211 * Create and send an asynchronous HTTP PATCH request.
212 *
213 * Use an absolute path to override the base path of the client, or a
214 * relative path to append to the base path of the client. The URL can
215 * contain the query string as well. Use an array to provide a URL
216 * template and additional variables to use in the URL template expansion.
217 *
218 * @param string|UriInterface $uri URI object or string.
219 * @param array $options Request options to apply.
220 */
221 public function patchAsync($uri, array $options = []): PromiseInterface
222 {
223 return $this->requestAsync('PATCH', $uri, $options);
224 }
225
226 /**
227 * Create and send an asynchronous HTTP DELETE request.
228 *
229 * Use an absolute path to override the base path of the client, or a
230 * relative path to append to the base path of the client. The URL can
231 * contain the query string as well. Use an array to provide a URL
232 * template and additional variables to use in the URL template expansion.
233 *
234 * @param string|UriInterface $uri URI object or string.
235 * @param array $options Request options to apply.
236 */
237 public function deleteAsync($uri, array $options = []): PromiseInterface
238 {
239 return $this->requestAsync('DELETE', $uri, $options);
240 }
241 }
242