- Adding more docs on error handling
- Tightening down the client interface to only allow RequestExceptions to be
thrown from a client during a send() method. This makes error handling much
easier and predictable.
- HTTP method based signatures like get(), put(), etc.. accept a URL,
and array of request options. createRequest() is similar but also requires
a method string.
- Renamed request events to 'before', 'complete', 'error', and 'headers.
- Renamed the associated event classes.
- Adding more docs.
- Instead of using a HeaderValues object for header values, I've added an
optional argument to getHeader() that specifies whether or not to return
a header as a string or an array.
- Adding the start of the new documentation.
- Better handling of request options passed from client to messages and
adapters.
- CurlAdapter now converts string keys that start with CURL to the equivalent
CURL_* constant value.
- Added a few extension points to requests and the CurlAdapter
Cleaning up config array after processing input data.
Removing getBaseUrl() from ClientInterface. Use getConfig('base_url')
Moving cacert out of the Resources folder and just into Http
Previously, the only way to se empty query string variables that had
no value (e.g., "foo" rather than "foo=") was to use the magic
"_guzzle_blank_" variable. This variable was then added in 3.8.1 to
query string values when parsing a query string so that when the
query string is again cast to a string it would not include the "="
sign. This works, but introduces pain points when working with these
parsed query strings because the data contained in the query string
object now needs special handling (you must check if the value is
"_guzzle_blank_" to see if it should actually be empty). This change
introduced an asymmetry between how a query string is serialized vs
how it is inspected.
The "_guzzle_blank_" logic was introduced due to #96. I believe the
change introduced as a result was the wrong decision and this commit
hopes to address it.
This change now makes `false`, `null`, and `"_guzzle_blank_"` all
act as query string fields that contain no value (meaning no trailing
equal sign). This change marked the use of `"_guzzle_blank_"` as
deprecated. If you still wish for an emtpy query string value that
includes a trailing "=", then use an empty string (i.e., `""`).
Here's an example of how the proposed change will affect query string
serialization:
Given a `Guzzle\Http\QueryString` object `$q`, adding the values on
left will serialize to the string on the right:
* `$q->set('foo', null)` => `"foo"` (previously `"foo="`)
* `$q->set('foo', false)` => `"foo"` (previously `"foo="`)
* `$q->set('foo', '_guzzle_blank_')` => `"foo"` (unchanged)
* `$q->set('foo', '')` => `"foo="` (unchanged)