Pop Tags

The Request Object

Access the current http request.

The request object represents the current request and gives access to the current url, query parameters, the request body and other request specific properties.

Here’s the full list of request properties:

request.request_method (GET, POST, PUT, DELETE)
request.url full url of the request hostname
request.path path with no query string (/hello?test=1 will be /hello)
request.query_string the query string (test=1)
request.fullpath path and query_string (/hello?test=1)
request.params an object with all the parameters from query and post body
request.GET parameters from the query string
request.body the raw post body
request.referrer the address where the request originated
request.user_agent the user agent string
request.cookies an object with all cookies for the current request
request.session a session object - values added to this object will be stored in the session
request.accept_encoding the accept header for the request
request.ip the remote IP address (IP of the visitor)
Continue to Log »