Method: HTTP::Message#headers

Defined in:
lib/httpclient/http.rb

#headersObject

Returns Hash of header. key and value are both String. Each key has a single value so you can’t extract exact value when a message has multiple headers like ‘Set-Cookie’. Use header for that purpose. (It returns an Array always)



1050
1051
1052
# File 'lib/httpclient/http.rb', line 1050

def headers
  Hash[*http_header.all.flatten]
end