protected function send(
        $method,
        $path,
        array $headers = array(),
        $queryString = null,
        array $links = null,
        $noCache = false,
        $absolutePath = false
    )
    {
        $headers = $this->initHeaders($headers);
        $transport = HttpTransportFactory::build(
            'curl',
            $this->getCacher(),
            $this->getLogger()
        );

        if (!$absolutePath) {
            $path = $this->getApiEndpointPath($path);
        }

        $transport
            ->setMethod($method)
            ->setPath($path)
            ->setHeaders($headers)
        ;

        if (null !== $queryString) {
            $transport->setQueryString($queryString);
        }
        if (null !== $links) {
            $transport->setLinks($links);
        }

        try {
            $response = $transport->send();
        } catch (ApiHttpResponseException $exception) {
            if (
                401 === $exception->getStatusCode() &&
                $this->container->has('da_oauth_client.authorization_refresher.oauth')
            ) {
                // Try to refresh the access token.
                $oauthRefresher = $this->container->get('da_oauth_client.authorization_refresher.oauth');
                $oauthRefresher->refresh();

                $response = $transport->send($noCache);
            } else {
                throw $exception;
            }
        }

        return $response;
    }