protected function getHttpQuery()
    {
        $arguments = [];

        foreach ($this->params as $key => $value) {
            if (isset(self::$encodeParams[$key])) {
                $arguments[$key] = json_encode($value);
            } elseif (is_bool($value)) {
                $arguments[$key] = $value ? 'true' : 'false';
            } else {
                $arguments[$key] = $value;
            }
        }

        return sprintf(
            '/%s/_design/%s/_view/%s?%s',
            $this->databaseName,
            $this->designDocumentName,
            $this->viewName,
            http_build_query($arguments)
        );
    }