1 | <?php |
||
16 | class HttpClientRequestHandlerReact implements RequestHandlerInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var Client |
||
20 | */ |
||
21 | protected $client; |
||
22 | |||
23 | /** |
||
24 | * HttpClientRequestHandler constructor. |
||
25 | * @param LoopInterface $loop |
||
26 | */ |
||
27 | public function __construct(LoopInterface $loop) |
||
31 | |||
32 | /** |
||
33 | * @param string $uri |
||
34 | * @return PromiseInterface |
||
35 | */ |
||
36 | public function get(string $uri): PromiseInterface |
||
41 | |||
42 | /** |
||
43 | * @param string $uri |
||
44 | * @param array $options |
||
45 | * @return PromiseInterface |
||
46 | */ |
||
47 | public function post(string $uri, array $options): PromiseInterface |
||
53 | |||
54 | /** |
||
55 | * @param Request $request |
||
56 | * @param mixed $data |
||
57 | * @return PromiseInterface |
||
58 | */ |
||
59 | private function processRequest(Request $request, $data = null): PromiseInterface |
||
88 | } |
||
89 |