1 | <?php |
||
10 | class Request implements RequestInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var HttpInterface |
||
14 | */ |
||
15 | protected $client; |
||
16 | |||
17 | public function __construct(HttpInterface $http, $token = null) |
||
23 | |||
24 | /** |
||
25 | * @param string $requestMethod |
||
26 | * @param string $uri |
||
27 | * @param array $params |
||
28 | * @param bool $useJson |
||
29 | * @return mixed |
||
30 | * @throws HeadHunterApiException |
||
31 | */ |
||
32 | public function makeRequest($requestMethod, $uri, $params = [], $useJson = false) |
||
38 | |||
39 | /** |
||
40 | * @param string $requestMethod |
||
41 | * @param string $uri |
||
42 | * @param array $params |
||
43 | * @return mixed |
||
44 | * @throws HeadHunterApiException |
||
45 | */ |
||
46 | public function makeJsonRequest($requestMethod, $uri, $params = []) |
||
52 | |||
53 | /** |
||
54 | * @param $requestMethod |
||
55 | * @param $uri |
||
56 | * @param array $params |
||
57 | * @return mixed |
||
58 | * @throws HeadHunterApiException |
||
59 | */ |
||
60 | protected function executeRequest($requestMethod, $uri, array $params = []) |
||
68 | } |