CKRequest represents requests of HTTP headers.
CKRequest returns form parameters and cookies.
But, in many cases, this class isn't used directly to get parameters
because CGIKit sets these parameters to components automatically in the
process of instanciating components.
Getting a request object
You can get a request object by CKApplication#request or
CKComponent#request.
Parameters
CKRequest has some methods to access
parameters.
multiple_params[key]: | Returns an array of parameters. If key is missing, returns an empty array.
|
single_param(key), [key]: | This method joins an array of parameters into a string and returns it. If
key is missing, returns nil.
|
Cookies
Cookies is an array which includes some CKCookie objects. See CKCookie section about details of cookie.
cookie(key): | Returns a CKCookie object whose key is the same
as the argument.
|
cookies: | Returns an array of CKCookie objects.
|
cookie_value(key): | Returns the value of CKCookie object whose key
is the the same as the argument.
|
cookie_values(key): | If the argument is nil(by default, argument is nil.), this method returns
an array which has all the values of cookies. Otherwise, it returns an
array which has the values of cookies specified by the argument.
|
HTTP Headers
Some of HTTP headers are defined by instance methods. Call
CKRequest#headers to get other CGI environment variables.