Module: HTTPX::Plugins::Expect
- Defined in:
- lib/httpx/plugins/expect.rb
Overview
This plugin makes all HTTP/1.1 requests with a body send the “Expect: 100-continue”.
Defined Under Namespace
Modules: ConnectionMethods, InstanceMethods, OptionsMethods, RequestMethods Classes: Store
Constant Summary collapse
- EXPECT_TIMEOUT =
2- NOEXPECT_STORE_MUTEX =
Thread::Mutex.new
Class Method Summary collapse
Class Method Details
.extra_options(options) ⇒ Object
42 43 44 |
# File 'lib/httpx/plugins/expect.rb', line 42 def () .merge(expect_timeout: EXPECT_TIMEOUT) end |
.no_expect_store ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/httpx/plugins/expect.rb', line 34 def no_expect_store return Ractor.store_if_absent(:httpx_no_expect_store) { Store.new } if Utils.in_ractor? @no_expect_store ||= NOEXPECT_STORE_MUTEX.synchronize do @no_expect_store || Store.new end end |