protected function handleResponse(ResponseInterface $response)
    {
        $status = $response->getStatusCode();

        $data = (string) $response->getBody();
        $jsonResponseData = json_decode($data, false);
        $body = $data && $jsonResponseData === null ? $data : $jsonResponseData;

        return ['status_code' => $status, 'body' => $body];
    }
protected function handleResponse(ResponseInterface $response)
    {
        $status = $response->getStatusCode();

        $data = (string) $response->getBody();
        $jsonResponseData = json_decode($data, false);
        $body = $data && $jsonResponseData === null ? $data : $jsonResponseData;

        return ['status_code' => $status, 'body' => $body];
    }
protected function handleResponse ( ResponseInterface $ response ) { $ status = $ response -> getStatusCode ( ) ; $ data = ( string ) $ response -> getBody ( ) ; $ jsonResponseData = json_decode ( $ data , false ) ; $ body = $ data && $ jsonResponseData === null ? $ data : $ jsonResponseData ; return [ 'status_code' => $ status , 'body' => $ body ] ; }
Handle HTTP response

@param  ResponseInterface $response
@return [type]
Handle HTTP response