public function query(string $query, int $nTries = 1): Result {
        $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
        $body    = 'query=' . rawurlencode($query);
        $request = new Request('POST', $this->url, $headers, $body);
        while ($nTries > 0) {
            $nTries--;
            try {
                $response = $this->client->send($request);
                $body     = $response->getBody();
                $result   = new Result($body, 'application/sparql-results+json');
                break;
            } catch (RequestException $ex) {
                if ($nTries <= 0) {
                    throw $ex;
                }
            }
        }
        return $result;
    }