private function transformRequest(Request $request)
    {
        $method = $request->getMethod();
        $url = (string) $request->getUrl();

        $transformed = $this->browser->getMessageFactory()->createRequest($method, $url);

        $transformed->setProtocolVersion($request->getProtocolVersion());
        $transformed->setHeaders($request->getHeaders());

        if ($body = $request->getBody()) {
            $transformed->setContent((string) $body);
        }

        return $transformed;
    }