tarcieri/http — pull request #11 by blambeau (2012-07-16 09:01:44+00:00)
Title: Support for {:body => ...} option

Ths usual scenario for this is posting to a resource with a JSON body. HTTP only supports url form encoding so far.

This branch aims at adding the ability to specify an explicit body in options. The first commit implements the feature in a straightforward way. I wonder whether some refactoring would not be needed now to clean the overal body support:

* Content-Length is implemented in Request
* Form encoding is implemented in Client
* Body and Form are separate in Options

Also, I wonder whether additional support for JSON body should not be provided as well (support for automatic Content-Type ala :form, etc.)

Thoughts?