Request headersSo the

So the rdoc claims that a rails request object should have a headers
method, right?

http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html


headers()

Provides acccess to the request‘s HTTP headers, for example:
request.headers[“Content-Type”] # => “text/plain”


Sounds simple enough. But when running in development mode on the local
server (start with ./script/server; mongrel installed), I find that my
request object is an ActionController::CgiRequest, and it has no headers
method defined. (“CgiRequest and TestRequest provide concrete
implementations.”, do they now?)

Huh? What am I missing, how do I get request headers? And should this
documentation be fixed?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs