1: | <?php |
2: | |
3: | namespace OpenSearch; |
4: | |
5: | /** |
6: | * Provides an interface for sending OpenSearch requests. |
7: | */ |
8: | interface TransportInterface |
9: | { |
10: | /** |
11: | * Create a new request. |
12: | * |
13: | * @param array<string, mixed> $params |
14: | * @param string|array<string, mixed>|null $body |
15: | * @param array<string, string> $headers |
16: | * |
17: | * @throws \Psr\Http\Client\ClientExceptionInterface |
18: | * @throws \OpenSearch\Exception\HttpExceptionInterface |
19: | */ |
20: | public function sendRequest( |
21: | string $method, |
22: | string $uri, |
23: | array $params = [], |
24: | string|array|null $body = null, |
25: | array $headers = [], |
26: | ): iterable|string|null; |
27: | |
28: | } |
29: |