diff options
Diffstat (limited to 'src/HTTP/Client.php')
| -rw-r--r-- | src/HTTP/Client.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/HTTP/Client.php b/src/HTTP/Client.php new file mode 100644 index 0000000..507c1b0 --- /dev/null +++ b/src/HTTP/Client.php @@ -0,0 +1,28 @@ +<?php + +// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue +// SPDX-License-Identifier: BSD-3-Clause + +declare(strict_types=1); + +namespace SimplePie\HTTP; + +/** + * HTTP Client interface + * + * @internal + */ +interface Client +{ + public const METHOD_GET = 'GET'; + + /** + * send a request and return the response + * + * @param Client::METHOD_* $method + * @param array<string, string> $headers + * + * @throws ClientException if anything goes wrong requesting the data + */ + public function request(string $method, string $url, array $headers = []): Response; +} |
