lib/httpx/plugins/expect.rb in httpx-1.3.0 vs lib/httpx/plugins/expect.rb in httpx-1.3.1
- old
+ new
@@ -18,9 +18,14 @@
def extra_options(options)
options.merge(expect_timeout: EXPECT_TIMEOUT)
end
end
+ # adds support for the following options:
+ #
+ # :expect_timeout :: time (in seconds) to wait for a 100-expect response,
+ # before retrying without the Expect header (defaults to <tt>2</tt>).
+ # :expect_threshold_size :: min threshold (in bytes) of the request payload to enable the 100-continue negotiation on.
module OptionsMethods
def option_expect_timeout(value)
seconds = Float(value)
raise TypeError, ":expect_timeout must be positive" unless seconds.positive?