1 | <?php namespace GameScan\Core\Request\Api\Http; |
||
9 | class Client implements ApiRequestInterface |
||
10 | { |
||
11 | |||
12 | protected $guzzle; |
||
13 | protected $headers = array(); |
||
14 | protected $parameters = array(); |
||
15 | protected $curlConfig = array(); |
||
16 | |||
17 | 14 | public function __construct() |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 14 | public function clean() |
|
31 | |||
32 | 14 | private function resetHeaders() |
|
36 | |||
37 | 14 | private function resetParameters() |
|
41 | |||
42 | /** |
||
43 | * Http Request Timeout |
||
44 | * @param int $timeout |
||
45 | * @throws \Exception |
||
46 | */ |
||
47 | public function setTimeout($timeout) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 14 | public function setHeaders(array $headers) |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 14 | public function setParameters(array $parameters) |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 14 | public function get($ressourceToGrab, array $parameters = null) |
|
91 | |||
92 | /** |
||
93 | * Get http request config for guzzle |
||
94 | * @return array |
||
95 | */ |
||
96 | 14 | protected function getConfig() |
|
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 10 | protected function checkHttpStatus($response) |
|
118 | } |
||
119 |