Module: HTTPX::Plugins::Cookies::InstanceMethods
- Extended by:
- Forwardable
- Defined in:
- lib/httpx/plugins/cookies.rb
Instance Method Summary collapse
Instance Method Details
#build_request ⇒ Object
43 44 45 46 47 |
# File 'lib/httpx/plugins/cookies.rb', line 43 def build_request(*) request = super request.headers.(request..[request.uri]) request end |
#initialize(options = {}, &blk) ⇒ Object
26 27 28 |
# File 'lib/httpx/plugins/cookies.rb', line 26 def initialize( = {}, &blk) super({ cookies: Jar.new }.merge(), &blk) end |
#wrap ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/httpx/plugins/cookies.rb', line 30 def wrap return super unless block_given? super do |session| = @options..dup begin yield session ensure @options = @options.merge(cookies: ) end end end |