protected function buildRecursive($key, $value)
    {
        $url = '';
        if (is_array($value)) {
            foreach ($value as $key2 => $val) {
                if ($part = $this->buildRecursive($key . '[' . $key2 . ']', $val)) {
                    $url .= ($url ? '&' : '') . $part;
                }
            }
        } else {
            $url .= ($url ? '&' : '') . urlencode($key) . '=' . urlencode($value);
        }

        return $url;
    }