public function getEndpoint($endpoint, $withHost = false, $forceReload = false)
    {
        $this->loadApiDefinition($forceReload);
        $url = "";
        if ($withHost) {
            $url = empty($this->options['host']) ? $this->definition->getHost() : $this->options['host'];
        }

        // If the base path is not already included, we need to add it.
        $url .= (empty($this->options['includeBasePath']) ? $this->definition->getBasePath() : '') . $endpoint;

        return $url;
    }