in lib/elastic/transport/transport/http/curb.rb [75:91]
def __build_connection(host, options={}, block=nil)
client = ::Curl::Easy.new
apply_headers(client, options)
client.url = __full_url(host)
if host[:user]
client.http_auth_types = host[:auth_type] || :basic
client.username = host[:user]
client.password = host[:password]
end
client.instance_eval(&block) if block
Connections::Connection.new :host => host, :connection => client
end