Module ringo/webapp/request
Adds convenience properties and methods to a JSGI 0.3 request object.
Request (request)
Adds convenience properties and methods to a JSGI 0.3 request object.
Parameters
| request | a JSGI 0.3 request object |
Request.prototype.charset
The name of the encoding used for this request
Request.prototype.contentLength
The request's content length, or undefined if not available.
Request.prototype.contentType
The request's content type, or undefined if not available.
Request.prototype.cookies
An object containing the HTTP cookie values sent with this request
Request.prototype.getHeader ()
Get a single request header value. If multiple headers exist for the given name, only the first one is returned.
Request.prototype.getHeaders ()
Get all header values for the given header name as an array.
Request.prototype.isDelete
True if this is a HTTP DELETE request.
Request.prototype.isGet
True if this is a HTTP GET request.
Request.prototype.isHead
True if this is a HTTP HEAD request.
Request.prototype.isPost
True if this is a HTTP POST request.
Request.prototype.isPut
True if this is a HTTP PUT request.
Request.prototype.isXhr
True if this is a XMLHttpRequest.
Request.prototype.params
An object containing the parsed HTTP parameters sent with this request.
Request.prototype.path
The full URI path of the request.
Request.prototype.pathDecoded
The URL-decoded URI path.
Request.prototype.reset ()
Reset the scriptName and pathInfo properties to their original values.
Request.prototype.session
A session object for the current request. If no session exists a new one will be created.
See
Session (request)
An HTTP session object. Properties of the session's data object are persisted between requests of the same client.
Parameters
| request | the JSGI request object |
Session.prototype.data
A container for things to store in this session between requests.
Session.prototype.isNew
True if this session was created in the current request. This can be useful to find out if the client has cookies disabled for cookie-based sessions.
