private function convertToZfResponse(ResponseInterface $response)
    {
        $zfResponse = new HttpResponse();

        $zfResponse->setStatusCode($response->getStatusCode());
        $zfResponse->setReasonPhrase($response->getReasonPhrase());
        $zfResponse->setContent((string) $response->getBody());

        foreach ($response->getHeaders() as $name => $values) {
            $zfResponse->getHeaders()->addHeaderLine($name, implode(", ", $values));
        }

        return $zfResponse;
    }