guzzle/guzzle — pull request #495 by sfriedman-pica9 (2013-12-10 17:53:05+00:00)
Title: Allow objects within content passed to addPostFields

While working with JSON I had decoded into an array that contained standard class objects, I found it difficult to use addPostFields in preparation for transmitting this data in an HTTP request.

These two small changes helped me.

Not sure if this violates a design decision that addPostFields should, intentionally, only contain arrays and strings. If so, would you consider this change if it contained an additional check to make sure any objects are of the type StdClass (to ensure that they can be properly cast)?

Curious for any thoughts here.

Sam