@param string $endpoint

@throws Exception

@return void
339050
private function validateEndpoint($endpoint)
    {
        $isValid = filter_var($endpoint, FILTER_VALIDATE_URL);

        if ($isValid) {
            $scheme = strtolower(parse_url($endpoint, PHP_URL_SCHEME));
            if (in_array($scheme, ['http', 'https'], true)) {
                return;
            }
        }

        throw new Exception(self::ERR_INVALID_ENDPOINT);
    }
668568
public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;

        if (bugsnag != null) {
            bugsnag.setEndpoints(endpoint, null);
        }
    }
1310507
protected function compile(Endpoint $endpoint): void
    {
        //run all extensions for each definition
        foreach ($this->plugins as $plugin) {
            //run extensions recursively in all types and fields
            foreach ($endpoint->allTypes() as $type) {
                $this->configureDefinition($plugin, $type, $endpoint);
                if ($type instanceof FieldsAwareDefinitionInterface) {
                    foreach ($type->getFields() as $field) {
                        $this->configureDefinition($plugin, $field, $endpoint);
                        foreach ($field->getArguments() as $argument) {
                            $this->configureDefinition($plugin, $argument, $endpoint);
                        }
                    }
                }
            }

            //run extension in all queries
            foreach ($endpoint->allQueries() as $query) {
                $this->configureDefinition($plugin, $query, $endpoint);
                foreach ($query->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            //run extensions in all mutations
            foreach ($endpoint->allMutations() as $mutation) {
                $this->configureDefinition($plugin, $mutation, $endpoint);
                foreach ($mutation->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            //run extensions in all subscriptions
            foreach ($endpoint->allSubscriptions() as $subscription) {
                $this->configureDefinition($plugin, $subscription, $endpoint);
                foreach ($subscription->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            $plugin->configureEndpoint($endpoint);
        }
    }
304033
public function setAuthorizationEndpoint($endpoint)
    {
        if (!in_array($endpoint, [self::ENDPOINT_AUTHENTICATE, self::ENDPOINT_AUTHORIZE])) {
            throw new Exception(
                sprintf("'%s' is not a correct Twitter authorization endpoint.", $endpoint)
            );
        }

        $this->authorizationEndpoint = $endpoint;

        return $this;
    }
471785
private function checkStatus($expectedStatus)
    {
        $status = $this->response->getStatusCode();
        
        if ($status != $expectedStatus) {
            throw new EndpointException("Unexpected HTTP status {$status} " . $this->response->getReasonPhrase());
        }
    }
437636
protected function request($endpoint = null, $method, $params)
    {
        $results = $this->makeRequest($endpoint, $method, $params);

        return $results ? $this->newInstance($results, true) : null;
    }
768375
public function begin($request, $endpoint, $method, $reference)
    {
        $this->startTimestamp = microtime(true);

        $this->lastEvent = $this->eventFactory->create($request, $endpoint, $method, $reference);

        return $this->adapter->save($this->lastEvent);
    }
505936
public function setEndpointParameters($endpointName, array $parameters)
    {
        /** @var AbstractSearchEndpoint $endpoint */
        $endpoint = $this->getEndpoint($endpointName);
        $endpoint->setParameters($parameters);
    }
1105268
protected function executeQuery($endpoint)
    {
        $ch = curl_init($endpoint);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $responseContent = curl_exec($ch);
        $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        if ($responseContent === false || $httpStatus != 200) {
            throw new MoneyException('Could not execute YahooFinanceRatioProvider query to endpoint '.$endpoint);
        }

        curl_close($ch);

        return $responseContent;
    }
211695
public function setServiceEndpoint(string $endpoint): AbstractClientBuilder
    {
        if (!filter_var($endpoint, FILTER_VALIDATE_URL) || parse_url($endpoint, PHP_URL_SCHEME) !== 'https') {
            throw new \InvalidArgumentException('Incorrect endpoint given');
        }

        $this->endpoint = $endpoint;

        return $this;
    }
786338
public function post($endpoint, array $data = [])
    {
        $body = json_encode($data);
        $request = $this->createRequest('POST', $endpoint, $body, ['Content-Type' => 'application/json']);
        return $this->sendRequest($request);
    }
767626
public function requestEndpoint(AbstractEndpoint $endpoint)
    {
        return $this->request(
            \ltrim($endpoint->getURI(), '/'),
            $endpoint->getMethod(),
            null === $endpoint->getBody() ? [] : $endpoint->getBody(),
            $endpoint->getParams()
        );
    }
603842
public function setEndEvent(EndEvent $endEvent): void
    {
        if ($this->endEvent) {
            throw new InvalidArgumentException('Call already completed.');
        }

        $endEvent->setCall($this);

        if (!$this->responseEvent) {
            $this->responseEvent = $endEvent;
        }

        $this->endEvent = $endEvent;
    }
322794
public void changeEndpoint(String endpoint) throws ConnectionEndpointArray.UnknownSchemeException {
        changeEndpoints(new Endpoints(new ConnectionEndpointArray().addEndpoint(endpoint).toArray(new ConnectionEndpoint[1]), new TrustedKey[0]));
    }
1168037
protected function setEndpoint(string $endpoint)
    {
        $fullEndpoint = 'https://' . $endpoint . '/rpc';

        if (!empty($endpoint) && $fullEndpoint !== $this->endpoint) {
            $this->endpoint = $fullEndpoint;
        }
    }
907306
private static function curl(string $endpoint)
    {
        // Get the base URL and App Key.
        $baseUrl = self::$_baseUrl;

        // Create a cURL session.
        $curl = curl_init();

        // Set the options necessary for communicating with the UCRM Server.
        curl_setopt($curl, CURLOPT_URL, $baseUrl.$endpoint);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_HEADER, false);

        // TODO: Determine if we EVER need to use HTTPS and how to handle it correctly here!
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); // DEFAULT
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1); // DEFAULT

        // Set the necessary HTTP HEADERS.
        curl_setopt($curl, CURLOPT_HTTPHEADER, self::$_headers);

        return $curl;
    }
736470
private function getURL($endpoint = null)
    {
        if (is_null($endpoint)) {
            $endpoint = $this->getEndpoint();
        } else {
            $endpoint = '/api/' . $endpoint;
        }

        return $this->config['url'] . $endpoint;
    }