| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | protected function sendRequest( |
||
| 38 | $method, |
||
| 39 | $uri, |
||
| 40 | array $headers = [], |
||
| 41 | $body = null, |
||
| 42 | $protocolVersion = '1.1' |
||
| 43 | ): \stdClass { |
||
| 44 | |||
| 45 | $uri = '/'.config('tibia-data-api.version').'/'.$uri; |
||
| 46 | |||
| 47 | $response = $this->tibiaData->getHttpClient()->request($method, $uri, [ |
||
| 48 | 'headers' => $headers, |
||
| 49 | 'body' => $body, |
||
| 50 | 'version' => $protocolVersion |
||
| 51 | ]); |
||
| 52 | |||
| 53 | return json_decode($response->getBody()->getContents()); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |