Method: ActionDispatch::Response#headers

Defined in:
actionpack/lib/action_dispatch/http/response.rb

#headersObject (readonly) Also known as: header

The headers for the response.

header["Content-Type"] # => "text/plain"
header["Content-Type"] = "application/json"
header["Content-Type"] # => "application/json"

Also aliased as ‘headers`.

headers["Content-Type"] # => "text/plain"
headers["Content-Type"] = "application/json"
headers["Content-Type"] # => "application/json"

Also aliased as ‘header` for compatibility.



71
72
73
# File 'actionpack/lib/action_dispatch/http/response.rb', line 71

def headers
  @headers
end