protected function buildQuery(string $name, $value, string $postfix= ''): string
    {
        $query = '';
        if (is_array($value)) {
            foreach ($value as $k => $v) {
                if (is_int($k)) {
                    $query .= $this->buildQuery('', $v, $postfix . $name .'[]');
                } else {
                    $query .= $this->buildQuery('', $v, $postfix . $name . '[' . $k . ']');
                }
            }
        } elseif (null === $value) {
            $query .= '&' . urlencode($name) . $postfix;
        } elseif (false === $value) {
            $query .= '&' . urlencode($name) . $postfix . '=0';
        } elseif (true === $value) {
            $query .= '&' . urlencode($name) . $postfix . '=1';
        } else {
            $query .= '&' . urlencode($name) . $postfix . '=' . urlencode($value);
        }

        return $query;
    }