Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | private function sendRequest(string $url, string $method = 'GET', array $options = []): ?array |
||
44 | { |
||
45 | $response = $this->client->request($method, $url, array_merge( |
||
46 | [ |
||
47 | 'headers' => [ |
||
48 | 'Accept' => 'application/json', |
||
49 | ], |
||
50 | 'auth' => [$this->username, $this->password], |
||
51 | ], |
||
52 | $options |
||
53 | )); |
||
54 | |||
55 | return json_decode($response->getBody()->getContents(), true); |
||
56 | } |
||
58 |