instance method
headers
Ruby on Rails 8.0.4
Since v3.0.20Signature
headers()
Provides access to the request’s HTTP headers, for example:
request.headers["Content-Type"] # => "text/plain"
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 232
def headers
@headers ||= Http::Headers.new(self)
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 232
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request