src/ChrisKonnertz/DeepLy/HttpClient/GuzzleHttpClient.php
public function ping($url)
    {
        if (! is_string($url)) {
            throw new \InvalidArgumentException('$url has to be a string');
        }

        try {
            $startedAt = microtime(true);
            $this->guzzle->get($url);
            $duration = microtime(true) - $startedAt;
        } catch (GuzzleException $exception) {
            throw new CallException('Did not get a valid response. API seems to be unreachable.');
        }

        return $duration;
    }
public function ping($url)
    {
        if (! is_string($url)) {
            throw new \InvalidArgumentException('$url has to be a string');
        }

        try {
            $startedAt = microtime(true);
            $this->guzzle->get($url);
            $duration = microtime(true) - $startedAt;
        } catch (GuzzleException $exception) {
            throw new CallException('Did not get a valid response. API seems to be unreachable.');
        }

        return $duration;
    }
Pings the API server. Returns the duration in seconds
or throws an exception if no valid response was received.

@param string $url The URL of the API endpoint
@return float
@throws CallException