lib/httpx/options.rb in httpx-0.1.0 vs lib/httpx/options.rb in httpx-0.2.0
- old
+ new
@@ -53,10 +53,11 @@
:headers_class => Class.new(Headers),
:request_body_class => Class.new(Request::Body),
:response_body_class => Class.new(Response::Body),
:transport => nil,
:transport_options => nil,
+ :resolver_class => (ENV["HTTPX_RESOLVER"] || :native).to_sym,
}
defaults.merge!(options)
defaults[:headers] = Headers.new(defaults[:headers])
defaults.each { |(k, v)| self[k] = v }
@@ -84,18 +85,18 @@
self.body_threshold_size = Integer(num)
end
def_option(:transport) do |tr|
transport = tr.to_s
- raise Error, "#{transport} is an unsupported transport type" unless IO.registry.keys.include?(transport)
+ raise Error, "#{transport} is an unsupported transport type" unless IO.registry.key?(transport)
self.transport = transport
end
%w[
params form json body
follow ssl http2_settings
request_class response_class headers_class request_body_class response_body_class
- io fallback_protocol debug debug_level transport_options
+ io fallback_protocol debug debug_level transport_options resolver_class resolver_options
].each do |method_name|
def_option(method_name)
end
def merge(other)