Module: HTTPX::Plugins::Cookies::OptionsMethods
- Defined in:
- lib/httpx/plugins/cookies.rb
Instance Method Summary collapse
Instance Method Details
#__initialize__ ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/httpx/plugins/cookies.rb', line 74 def __initialize__(*) super return unless @headers.key?("cookie") @headers.delete("cookie").each do |ck| ck.split(/ *; */).each do || name, value = .split("=", 2) .add(Cookie.new(name, value)) end end end |
#option_cookies(value) ⇒ Object
87 88 89 |
# File 'lib/httpx/plugins/cookies.rb', line 87 def (value) value.is_a?(Jar) ? value : Jar.new(value) end |