http\Client\Request http\Client\Request::setQuery([mixed $query_data = NULL])

(Re)set the querystring. See http\Client\Request::addQuery() and http\Message::setRequestUrl().

Params:

Returns:

Throws:

Example:


<?php
$q 
= new http\QueryString("foo=bar&bar=foo");
$r = new http\Client\Request;
$r->setQuery($q);
var_dump($r->getRequestUrl());
?>

Yields:


string(33) "http://localhost/?foo=bar&bar=foo"