protected function buildUrl($uri, $params)
    {
        $host = $this->buildHostString();

        if (strpos($uri, "/") !== 0) {
            $uri = "/" . $uri;
        }

        $url = $host . $uri;


        if ($params === null) {
            $params = array();
        }

        $url .= $this->buildQueryString($params);

        return $url;
    }