lib/httpx/options.rb in httpx-1.2.6 vs lib/httpx/options.rb in httpx-1.3.0

- old
+ new

@@ -89,11 +89,11 @@ # creates a new options instance from a given hash, which optionally define the following: # # :debug :: an object which log messages are written to (must respond to <tt><<</tt>) # :debug_level :: the log level of messages (can be 1, 2, or 3). # :ssl :: a hash of options which can be set as params of OpenSSL::SSL::SSLContext (see HTTPX::IO::SSL) - # :http2_settings :: a hash of options to be passed to a HTTP2Next::Connection (ex: <tt>{ max_concurrent_streams: 2 }</tt>) + # :http2_settings :: a hash of options to be passed to a HTTP2::Connection (ex: <tt>{ max_concurrent_streams: 2 }</tt>) # :fallback_protocol :: version of HTTP protocol to use by default in the absence of protocol negotiation # like ALPN (defaults to <tt>"http/1.1"</tt>) # :supported_compression_formats :: list of compressions supported by the transcoder layer (defaults to <tt>%w[gzip deflate]</tt>). # :decompress_response_body :: whether to auto-decompress response body (defaults to <tt>true</tt>). # :compress_request_body :: whether to auto-decompress response body (defaults to <tt>true</tt>) @@ -122,14 +122,10 @@ # :ip_families :: which socket families are supported (system-dependent) # :origin :: HTTP origin to set on requests with relative path (ex: "https://api.serv.com") # :base_path :: path to prefix given relative paths with (ex: "/v2") # :max_concurrent_requests :: max number of requests which can be set concurrently # :max_requests :: max number of requests which can be made on socket before it reconnects. - # :params :: hash or array of key-values which will be encoded and set in the query string of request uris. - # :form :: hash of array of key-values which will be form-or-multipart-encoded in requests body payload. - # :json :: hash of array of key-values which will be JSON-encoded in requests body payload. - # :xml :: Nokogiri XML nodes which will be encoded in requests body payload. # # This list of options are enhanced with each loaded plugin, see the plugin docs for details. def initialize(options = {}) do_initialize(options) freeze @@ -214,11 +210,11 @@ def option_ip_families(value) Array(value) end %i[ - params form json xml body ssl http2_settings + ssl http2_settings request_class response_class headers_class request_body_class response_body_class connection_class options_class io fallback_protocol debug debug_level resolver_class resolver_options compress_request_body decompress_response_body persistent @@ -226,10 +222,10 @@ class_eval(<<-OUT, __FILE__, __LINE__ + 1) def option_#{method_name}(v); v; end # def option_smth(v); v; end OUT end - REQUEST_BODY_IVARS = %i[@headers @params @form @xml @json @body].freeze + REQUEST_BODY_IVARS = %i[@headers].freeze def ==(other) super || options_equals?(other) end