mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
cookies might be nil (in fact, the default options won't be the same when expanding the options, think about this for a while
This commit is contained in:
parent
7d9f6f2466
commit
1c507545c1
@ -22,6 +22,7 @@ module HTTPX
|
||||
|
||||
module HeadersMethods
|
||||
def cookies(cookies)
|
||||
return unless cookies
|
||||
cookies.each do |k, v|
|
||||
cookie = k.is_a?(HTTP::Cookie) ? k : HTTP::Cookie.new(k.to_s, v.to_s)
|
||||
add("cookie", cookie.cookie_value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user