src/Api/Api/Api.php
public function get(string $alias): Service
    {
        if (!$this->serviceCollection->containsKey($alias)) {
            throw new OutOfRangeException('Service "'.$alias.'" does not exist.');
        }

        $service = $this->serviceCollection->get($alias);
        $entry = $this->serviceRepository->find($this->namespace.'_'.explode('.', $alias)[0].'_api_http');

        if ($entry) {
            foreach ($entry->getTags() as $tag) {
                if (substr($tag, 0, 25) === 'proxy.frontend.rule=Host:') {
                    $host = substr($tag, 25);
                    $service->setHost($host);
                }
            }
        }

        $credentials = 'Bearer '.$this->getToken();
        $service->setHeader('Authorization', $credentials);

        return $service;
    }
public function get(string $alias): Service
    {
        if (!$this->serviceCollection->containsKey($alias)) {
            throw new OutOfRangeException('Service "'.$alias.'" does not exist.');
        }

        $service = $this->serviceCollection->get($alias);
        $entry = $this->serviceRepository->find($this->namespace.'_'.explode('.', $alias)[0].'_api_http');

        if ($entry) {
            foreach ($entry->getTags() as $tag) {
                if (substr($tag, 0, 25) === 'proxy.frontend.rule=Host:') {
                    $host = substr($tag, 25);
                    $service->setHost($host);
                }
            }
        }

        $credentials = 'Bearer '.$this->getToken();
        $service->setHeader('Authorization', $credentials);

        return $service;
    }
Get service

@param string $alias
@return \Ds\Component\Api\Service\Service
@throws \OutOfRangeException