1<?php 2 3// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue 4// SPDX-License-Identifier: BSD-3-Clause 5 6declare(strict_types=1); 7 8namespace SimplePie\HTTP; 9 10/** 11 * HTTP Client interface 12 * 13 * @internal 14 */ 15interface Client 16{ 17 public const METHOD_GET = 'GET'; 18 19 /** 20 * send a request and return the response 21 * 22 * @param Client::METHOD_* $method 23 * @param array<string, string> $headers 24 * 25 * @throws ClientException if anything goes wrong requesting the data 26 */ 27 public function request(string $method, string $url, array $headers = []): Response; 28} 29