Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function makeRequest($request = "", $type = "GET") |
||
16 | { |
||
17 | $client = new Client(); |
||
18 | $this->request = $client->request($type, $this->CF->Endpoint . $request, [ |
||
19 | 'headers' => [ |
||
20 | 'X-Auth-Key' => $this->CF->APIKEY, |
||
21 | 'X-Auth-Email' => $this->CF->Email |
||
22 | ] |
||
23 | ]); |
||
24 | |||
25 | $response = (string) $this->request->getBody(); |
||
26 | $this->response = @json_decode($response); |
||
27 | |||
28 | return $this; |
||
29 | } |
||
30 | |||
36 |