class Faraday::Adapter::HTTPClient

def call(env)

def call(env)
  super
  if req = env[:request]
    if proxy = req[:proxy]
      configure_proxy proxy
    end
    if bind = req[:bind]
      configure_socket bind
    end
    configure_timeouts req
  end
  if env[:url].scheme == 'https' && ssl = env[:ssl]
    configure_ssl ssl
  end
  # TODO Don't stream yet.
  # https://github.com/nahi/httpclient/pull/90
  env[:body] = env[:body].read if env[:body].respond_to? :read
  resp = client.request env[:method], env[:url],
    :body   => env[:body],
    :header => env[:request_headers]
  save_response env, resp.status, resp.body, resp.headers
  @app.call env
rescue ::HTTPClient::TimeoutError
  raise Faraday::Error::TimeoutError, $!
end