public function fetchResponse(RequestInterface $request): ResponseInterface
    {
        $requestId = $this->getRequestId($request);
        if (!isset($this->pendingRequests[$requestId])) {
            $this->pendingRequests[$requestId] = $this->createPromiseForRequest($request, true);
        }

        try {
            $response = $this->pendingRequests[$requestId]->wait();
        } finally {
            unset($this->pendingRequests[$requestId]);
        }
        return $response;
    }