Class

Request

Extends:

There's no documentation for this item.

Constants
CONTENT_TYPE_REGEX
CRLF
EOL
FILENAME_REGEX
METHODS
NAME_REGEX
Public Attributes
env
session
Public Methods
accept
accept_charset
accept_encoding
accept_language
action
ajax? Alias for #xml_http_request?
cache_control
connection
content_length
content_type
controller_class
controller_name
cookies
domain returns the full domain name without the port number.
escape Escapes s for use in a URL.
gateway
host returns the full hostname including port
host
keep_alive
method
new
normalize_params
params
parse_multipart
path Returns the uri without the query string. Strips trailing ’/’ and reduces duplicate ’/’ to a single ’/’
path_info returns the PATH_INFO
port returns the port the server is running on
protocol returns either ‘https://’ or ‘http://’ depending on the HTTPS header
query_parse parses a query string or the payload of a POST request into the params hash. So for example: /foo?bar=nik&post[title]=heya&post[body]=whatever parses into: {:bar => ‘nik’, :post => {:title => ‘heya’, :body => ‘whatever’}}
query_string
raw_post
referer returns the request HTTP_REFERER.
remote_ip returns the remote IP address if it can find it.
route
route_index
route_params
script_name
server_name
server_software
ssl? returns true if the request is an SSL request
subdomains returns an array of all the subdomain parts of the host.
unescape Unescapes a string (i.e., reverse URL escaping).
uri returns he request uri.
user_agent
version
xhr? Alias for #xml_http_request?
xml_http_request? Returns true if the request is an Ajax request.
Private Methods
body_and_query_params
body_params A hash of parameters passed in the body of the request.
json_params
multipart_params
query_params A hash of parameters passed from the URL like ?blah=hello
route_match returns two objects, route_index and route_params
xml_params
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.