1 | <?php |
||
12 | class Guzzle |
||
13 | { |
||
14 | use LogTrait; |
||
15 | |||
16 | /** @var Client */ |
||
17 | private $client; |
||
18 | |||
19 | public function __construct(Client $client, LoggerInterface $log = null) |
||
24 | |||
25 | public function getClient() : Client |
||
29 | |||
30 | public function getAsync(string $uri, array $options = [], callable $onRejected = null) : PromiseInterface |
||
36 | |||
37 | public function postAsync(string $uri, array $options = [], callable $onRejected = null) : PromiseInterface |
||
43 | |||
44 | public function get(string $uri, array $options = []) : ResponseInterface |
||
48 | |||
49 | public function put(string $uri, array $options = []) : ResponseInterface |
||
53 | |||
54 | public function post(string $uri, array $options = []) : ResponseInterface |
||
58 | |||
59 | private function logRejection($reason) |
||
68 | } |