Class Rack::Request
In: lib/rack/request.rb
Parent: Object

Rack::Request provides a convenient interface to a Rack environment. It is stateless, the environment env passed to the constructor will be directly modified.

  req = Rack::Request.new(env)
  req.post?
  req.params["data"]

Methods

GET   POST   []   []=   body   cookies   delete?   fullpath   get?   host   new   params   path_info   path_info=   port   post?   put?   query_string   referer   referrer   request_method   scheme   script_name   script_name=   url   values_at   xhr?  

Attributes

env  [R]  The environment of the request.

Public Class methods

Public Instance methods

Returns the data recieved in the query string.

Returns the data recieved in the request body.

This method support both application/x-www-form-urlencoded and multipart/form-data.

shortcut for request.params[key]

shortcut for request.params[key] = value

The union of GET and POST data.

the referer of the client or ’/’

referrer()

Alias for referer

Tries to return a remake of the original request URL as a string.

like Hash#values_at

[Validate]