| 1 | <?php |
||
| 9 | class GuzzleHttp implements HttpClientInterface |
||
| 10 | { |
||
| 11 | public $request; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Initialise Guzzle client using headers appropriate to adapter. |
||
| 15 | * |
||
| 16 | * @param array $headers |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | public function initClient($headers) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get status code from http response. |
||
| 30 | * |
||
| 31 | * @param GuzzleResponse $response |
||
| 32 | * @return integer |
||
| 33 | */ |
||
| 34 | public function getStatus($response) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get http response body, cast to json and decode. |
||
| 41 | * |
||
| 42 | * @param GuzzleHttp\Response object $response |
||
| 43 | * @return array |
||
| 44 | */ |
||
| 45 | public function getBody($response) |
||
| 49 | } |
||
| 50 |