ruflin/Elastica — pull request #320 by christeredvartsen (2013-02-02 12:24:50+00:00)
Title: Optionally use HTTP POST instead of GET when the request has a body

This PR includes a possible solution to #210.

I have added support for using arrays as the transport configuration when creating the client, and an option for using POST instead of GET when the request has a body:

```php
$client = new Elastica\Client(array(
'transport' => array(
'type' => 'Http',
'postWithRequestBody' => true,
),
));
```

The Http(s) transports currently does not have their own configuration/parameters, so this needs to be passed to the `exec()` method from the connection, or fetched from the connection instance itself (as this PR does).

The `AbstractTransport` class actually has a `$_config` property, but this is not used in the Http(s) transports. If the transport classes could have their own params/config, options such as this one might be set on the transport instance instead of the connection.

Test cases have been added for the new features.