Add Query String to Request

@param  string  $key
@param  string  $value
@return $this
353897
public function addQueryString($key, $value)
    {
        if (is_bool($value)) {
            $value = $value ? 'true' : 'false';
        }

        $item[$key] = (string) $value;

        $this->queryStrings[] = $item;

        return $this;
    }
882559
public function setParam($key, $value)
        {
            $key = (null !== ($alias = $this->getAlias($key))) ? $alias : $key;
            parent::setParam($key, $value);

            return $this;
        }
811770
public function addQueryData($key, $value) {
        // TODO: freeze the instance after configuration and automatically call copy()

        if (!is_string($key))       throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key));
        if (!isset($value))         $value = '';
        elseif (is_bool($value))    $value = (int) $value;
        elseif (!is_scalar($value)) throw new IllegalTypeException('Illegal type of parameter $value: '.gettype($value));

        $value = (string) $value;

        // TODO: extend to process multiple parameters at once
        $path      = $this->getPath();
        $separator = (strpos($path, '?')!==false) ? '&' : '?';
        $this->setPath($path.$separator.$key.'='.str_replace([' ','#','&'], ['%20','%23','%26'], $value));

        return $this;
    }
375711
public function addRequestOption($key, $value)
    {
        if ((!is_null($key)) && (!is_null($value))) {
            $this->requestOptions[$key] = $value;
        }
    }
321116
public function queryParam($name, $value)
	{
		if($value === NULL)
		{
			unset($this->query[(string)$name]);
		}
		else
		{
			$this->query[(string)$name] = $value;
		}
		
		return $this;
	}
219827
public Query addQueryUrlParams(String key, String value) {
    this.queryUrlParams.put(key, value);
    return this;
  }
734781
public function set(string $key, $value): Definition
    {
        $this->data[$key] = $value;

        return $this;
    }
686164
public Request query(String key, Object value) {
        this.query.put(key, value);
        return this;
    }
2253
public function addRequestHeader($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $newKey => $newValue) {
                $this->addRequestHeader($newKey, $newValue);
            }
        } else {
            $key = preg_replace_callback(
                '/([\s\-_]|^)([a-z0-9-_])/',
                function ($match) {
                    return strtoupper($match[0]);
                },
                $key
            );
            $this->requestHeader[] = "$key: $value";
        }
    }
926199
public function addOption($key, $value)
    {
        $this->_validateOption($key);

        $this->_options[$key][] = $value;

        return $this;
    }
1126362
public function value($key, $value)
    {
        $this->values = array_merge($this->values ?? [], [$this->trimName($key) => $value]);
        return $this;
    }
1340106
public function addQuery($key, $value = null)
    {
        //if it's an array
        if (is_array($key)) {
            //warning this overwrites existing headers
            $this->query = $key;
            return $this;
        }

        //else it should be key value
        $this->query[$key] =  $value;
        return $this;
    }
845902
public function setHeader($key, $value)
    {
        if (!$this->controller->canEnd()) {
            return;
        }
        $this->response->header($key, $value);
        return $this;
    }
695645
public function addCookie($key, $value) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if(false === is_string($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		$this -> cookies[] = sprintf('%s=%s', $key, $value);

		return $this;
	}
1242601
public function setParam($key, $value)
        {
            $key = (string) $key;

            if ((null === $value) && isset($this->_params[$key])) {
                unset($this->_params[$key]);
            } elseif (null !== $value) {
                $this->_params[$key] = $value;
            }

            return $this;
        }
1343390
public function add($name, $value = null)
    {
        if (empty($name)) {
            return $this;
        }

        $params = (!is_array($name) ? array($name => $value) : $name);

        $query = $this->query(true);

        foreach ($params as $key => $val) {
            if (empty($val)) {
                unset($query[$key]);
            } elseif (!empty($val)) {
                $query[$key] = $val;
            }
        }

        $query              = http_build_query($query);
        $this->url['query'] = $query;

        return $this;
    }
1000603
public function add($key, $value = null)
    {
        $this->_view->with($key, $value);

        return $this;
    }