This change updates query strings so that they are treated as un-encoded
values by default where the value represents an un-encoded value to send
over the wire. A Query object then encodes the value before sending over
the wire. This means that even value query string values (e.g., ":") are
url encoded. This makes the Query class match PHP's http_build_query
function. However, if you want to send requests over the wire using
valid query string characters that do not need to be encoded, then you
can provide a string to Url::setQuery() and pass true as the second
argument to specify that the query string is a raw string that should
not be parsed or encoded (unless a call to getQuery() is subsequently
made, forcing the query-string to be converted into a Query object).
This commit updates path and query string encoding to better handle
strings that are already percent encoded, and now allows for all of the
characters valid for paths and queries specified in RFC 3986 to be
present in a URL without being encoded.
When using multiple slashes in URLs, normalization caused them to be combined
into a single slash. This commit fixes that issue to work exactly how Chrome
handles these types of URLs. Closes#713.
- Removing getConfig() and setConfig() from clients to avoid confusion around
whether things like base_url, message_factory, etc should be able to be
retrieved from getConfig() or modified using setConfig().
- Adding getDefaults() and setDefaultValue() to customize default request
options of a client.
- Updating Url class to check if a scheme and host are set before adding
":" and "//". This allows empty Url (e.g., "") to be serialized as "".
- Removing dead code from Url class.
- Adding a functions.php function for get_path and set_path so that these
functions can be used on regular PHP arrays. Collection now proxies to these
functions when Collection::(get|set)Path() is called.
- Resolves#599.