# Request headersSo the

**URL:** <https://www.ruby-forum.com/t/request-headersso-the/141847>\
**Category:** Rails\
**Created:** [July 1, 2008, 12:39am UTC](https://www.ruby-forum.com/t/request-headersso-the/141847 "2008-07-01T00:39:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [July 1, 2008, 12:39am UTC](https://www.ruby-forum.com/t/request-headersso-the/141847/1 "2008-07-01T00:39:24Z")

</div>

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

[http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html](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?
