module HTTPX::Plugins::Expect

  1. lib/httpx/plugins/expect.rb

This plugin makes all HTTP/1.1 requests with a body send the “Expect: 100-continue”.

gitlab.com/os85/httpx/wikis/Expect#expect

Methods

Public Class

  1. extra_options
  2. no_expect_store

Constants

EXPECT_TIMEOUT = 2  
NOEXPECT_STORE_MUTEX = Thread::Mutex.new  

Public Class methods

extra_options(options)
[show source]
   # File lib/httpx/plugins/expect.rb
42 def extra_options(options)
43   options.merge(expect_timeout: EXPECT_TIMEOUT)
44 end
no_expect_store()
[show source]
   # File lib/httpx/plugins/expect.rb
34 def no_expect_store
35   return Ractor.store_if_absent(:httpx_no_expect_store) { Store.new } if Utils.in_ractor?
36 
37   @no_expect_store ||= NOEXPECT_STORE_MUTEX.synchronize do
38     @no_expect_store || Store.new
39   end
40 end