Module: HTTPX::Plugins::Cookies::HeadersMethods

Defined in:
lib/httpx/plugins/cookies.rb

Instance Method Summary collapse

Instance Method Details


106
107
108
109
110
111
112
113
# File 'lib/httpx/plugins/cookies.rb', line 106

def set_cookie(jar)
  return unless jar

  cookie_value = HTTP::Cookie.cookie_value(jar.cookies)
  return if cookie_value.empty?

  add("cookie", cookie_value)
end