get an endpoint

@param string  $endpoint    endpoint
@param boolean $withHost    attach host name to the url
@param bool    $forceReload Switch to force a new api definition object will be provided.

@return string
497746
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;
    }
953215
public function getCropEndpoint(
        $endpoint,
        $parameters = array(),
        $absolute = UrlGeneratorInterface::ABSOLUTE_PATH
    ) {
        $parameters = array_merge($parameters, array('endpoint' => $endpoint));

        return $this->router->generate($this->routeName, $parameters, $absolute);
    }
1023188
protected function getCropResolver($endpoint)
    {
        $cropedResolver = $this->configuration->getValue($endpoint, 'croped_resolver');
        if (!$cropedResolver) {
            throw new JbFileUploaderException('No croped_resolver configuration for endpoint '.$endpoint);
        }

        return $cropedResolver;
    }
19445
public function get($endpoint, array $parameters = array())
    {
        if (!empty($parameters)) {
            $path = sprintf("%s/?%s", $endpoint, http_build_query($parameters));
        } else {
            $path = $endpoint;
        }

        return $this->execute("GET", sprintf("%s%s", $this->host, $path));
    }
685892
public static function Request($WithWebRoot = FALSE, $WithDomain = FALSE, $RemoveSyndication = FALSE) {
      $Result = Gdn::Request()->Path();
      if($WithWebRoot)
         $Result = self::WebRoot($WithDomain).'/'.$Result;
      return $Result;
   }
399421
public static function url($endpoint = null, $suffix = '')
    {
        $base = Phramework::getSetting('base');

        if ($endpoint) {
            $suffix = $endpoint . '/' . $suffix;

            $suffix = str_replace('//', '/', $suffix);
        }
        return $base . $suffix;
    }
1198202
protected function getEndpoint($method)
    {
        $endpoint = "calls";
        $searchParams = $this->getArgument("search_params");
        if (!is_null($searchParams)) {
            $queryString = http_build_query($searchParams);
            $this->delArgument("search_params");
            return "$endpoint?$queryString";
        }
        return $endpoint;
    }
761131
public function getEndPoint()
    {
        $html = $this->response->getHtmlContent();

        if ($html && ($url = self::getEndPointFromDom($html))) {
            try {
                $endPoint = $this->response->getUrl()->createAbsolute($url);
            } catch (Exception $exception) {
                return null;
            }

            if ($endPoint->getExtension() !== 'xml' && !$endPoint->hasQueryParameter('format')) {
                return $endPoint->withQueryParameter('format', 'json');
            }

            return $endPoint;
        }
    }
771277
public function setEndpoint($endpoint)
    {
        if (!in_array($endpoint, [self::ENDPOINT_SANDBOX, self::ENDPOINT_PRODUCTION])) {
            throw new InvalidArgumentException('Endpoint inválido.');
        }

        $this->endpoint = $endpoint;

        return $this;
    }
222564
public function requestGet($endpoint, $params = array(), $headers = array())
    {
        return $this->getClient()->get($endpoint, $params, $headers);
    }
244905
public function getValue($endpoint, $key)
    {
        if (isset($this->endpoints['endpoints'][$endpoint])
            && isset($this->endpoints['endpoints'][$endpoint][$key])
        ) {
            return $this->endpoints['endpoints'][$endpoint][$key];
        }

        if (isset($this->endpoints[$key])) {
            return $this->endpoints[$key];
        }

        return null;
    }
496062
private function getApiEndpoint($endpoint, $orcid = null)
    {
        $url  = 'https://';
        $url .= $this->level . '.';
        $url .= (!empty($this->environment)) ? $this->environment . '.' : '';
        $url .= self::HOSTNAME;
        $url .= '/v' . self::VERSION . '/';
        $url .= $orcid ?: $this->getOrcid();
        $url .= '/' . $endpoint;

        return $url;
    }
340238
private function parseEndpoint($endpoint)
    {
        $parsed = parse_url($endpoint);

        // parse_url() will correctly parse full URIs with schemes
        if (isset($parsed['host'])) {
            return $parsed;
        }

        // parse_url() will put host & path in 'path' if scheme is not provided
        if (isset($parsed['path'])) {
            $split = explode('/', $parsed['path'], 2);
            $parsed['host'] = $split[0];
            if (isset($split[1])) {
                $parsed['path'] = $split[1];
            } else {
                $parsed['path'] = '';
            }
            return $parsed;
        }

        throw new UnresolvedEndpointException("The supplied endpoint '"
            . "{$endpoint}' is invalid.");
    }
161768
public function getAuthUrl($endpoint = null)
    {
        if ($endpoint !== null) {
            $this->endpoint = $endpoint;
        }
        $query_string = [
            'response_type' => self::RESPONSE_TYPE,
            'client_id'     => $this->client_id,
            'redirect_uri'  => $this->redirect_uri,
            'scope'         => implode(',', $this->scope),
        ];

        return $this->endpoint.self::OAUTH_AUTHORIZE.'?'.http_build_query($query_string);
    }
1082371
@Override
    public int getHostPort(Object endPoint)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getHostPort", endPoint);

        int port = 0;
        if (endPoint instanceof CFEndPoint)
        {
            port = ((CFEndPoint) endPoint).getPort();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getHostPort", Integer.valueOf(port));
        return port;
    }
416568
protected function getEndpointsWithResourceMethods(EndpointCollection $endpoints)
    {
        return Collection::make($endpoints)->filter(function ($endpoint) {
            return $endpoint instanceof MethodEndpoint &&
                    in_array($endpoint->method, $this->methods);
        })->all();
    }
374890
protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }