1 | <?php declare(strict_types=1); |
||
18 | class Request implements RequestInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $global_options; |
||
24 | |||
25 | /** |
||
26 | * Request constructor |
||
27 | * |
||
28 | * @param array $global_options cURL options |
||
29 | */ |
||
30 | public function __construct(array $global_options) |
||
34 | |||
35 | /** |
||
36 | * Send request |
||
37 | * |
||
38 | * @param string $url |
||
39 | * @param array|null $data |
||
40 | * @return ResponseInterface |
||
41 | * @throws Exception |
||
42 | */ |
||
43 | public final function send(string $url, array $data = null): ResponseInterface |
||
65 | |||
66 | /** |
||
67 | * Prepare request |
||
68 | * |
||
69 | * @param string $url |
||
70 | * @param string $raw_data |
||
71 | * @return array |
||
72 | */ |
||
73 | protected function prepare(string $url, string $raw_data = null): array |
||
81 | } |