technoweenie/faraday — pull request #154 by hakanensari (2012-05-02 16:29:31+00:00)
Title: Common config to bind local socket

Gents:

Long story short: Some HTTP libraries expose the local socket, some don't. I will, in turn, expose the option in Faraday wherever available.

I like igrigorik's naming, so am going with:

```ruby
request: bind: host: 'foo', port: 'bar'
```

I've done the `EM::Http` libs and will do `Typhoeus` (which only exposes the bind host) shortly. In case you pull in the `HttpClient` adapter, I'll also fix the naming there to make all clean and consistent.

Also, while doing this, it's caught my attention that the fiber `EM::Http` config was broken: All options were shoved into the request config, so the adapter was essentially ignoring proxy, ssl, etc. config.

I killed the bad config setup in the fiber adapter and shared that of the EM with it. They are essentially the same library, so it makes sense to do so, in any case.