private function setHeaders(RequestInterface $request)
    {
        $headers = [];
        foreach ($request->getHeaders() as $header => $values) {
            $headers[] = "{$header}: ".implode('; ', $values);
        }
        $this->options[CURLOPT_HTTPHEADER] = $headers;
    }