Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class GuzzleAdapter implements HttpAdapterInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var \SprykerEco\Zed\Episerver\EpiserverConfig |
||
21 | */ |
||
22 | protected $config; |
||
23 | |||
24 | /** |
||
25 | * @var \GuzzleHttp\Client |
||
26 | */ |
||
27 | protected $client; |
||
28 | |||
29 | /** |
||
30 | * @param \SprykerEco\Zed\Episerver\EpiserverConfig $config |
||
31 | */ |
||
32 | public function __construct(EpiserverConfig $config) |
||
33 | { |
||
34 | $this->config = $config; |
||
35 | |||
36 | $this->client = new Client([ |
||
37 | RequestOptions::TIMEOUT => $this->config->getRequestTimeout(), |
||
38 | ]); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $gatewayUrl |
||
43 | * |
||
44 | * @throws \SprykerEco\Zed\Episerver\Business\Exception\ApiHttpRequestException |
||
45 | * |
||
46 | * @return \Psr\Http\Message\ResponseInterface |
||
47 | */ |
||
48 | public function sendGetRequest(string $gatewayUrl): ResponseInterface |
||
61 | } |
||
62 | } |
||
63 |