private function setParams(Response $response)
    {
        $this->protocol = $response->getProtocolVersion();
        $this->statusCode = (int) $response->getStatusCode();
        $this->headers = $response->getHeaders();
        $this->body = json_decode($response->getBody()->getContents());
        $this->extractBodyParts();
    }