Method: HTTP::Message#cookies
- Defined in:
- lib/httpclient/http.rb
#cookies ⇒ Object
Extracts cookies from ‘Set-Cookie’ header. Supports ‘Set-Cookie’ in response header only. Do we need ‘Cookie’ support in request header?
1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/httpclient/http.rb', line 1057 def = http_header['set-cookie'] unless .empty? uri = http_header.request_uri .map { |str| WebAgent::Cookie.parse(str, uri) }.flatten end end |