protected function url($path = '', $query = [])
    {
        $path = $this->urlBase() . $path;
        $query = http_build_query(array_merge($this->params, $query));

        $url = $path;
        if (!empty($query)) {
            $url .= '?' . $query;
        }

        return $url;
    }