Implements: HTTP_Message | Kohana_HTTP_Message
This class is a transparent base class for HTTP_Request and should not be accessed directly.
A HTTP Request specific interface that adds the methods required by HTTP requests. Over and above Kohana_HTTP_Interaction, this interface provides method, uri, get and post methods.
Class declared in SYSPATH/classes/Kohana/HTTP/Request.php on line 15.
string(3) "GET"
string(4) "POST"
string(3) "PUT"
string(6) "DELETE"
string(4) "HEAD"
string(7) "OPTIONS"
string(5) "TRACE"
string(7) "CONNECT"
Gets or sets the HTTP method. Usually GET, POST, PUT or DELETE in traditional CRUD applications.
string
$method
= NULL - Method to use for this request mixed
public function method($method = null);
Gets or sets HTTP POST parameters to the request.
mixed
$key
= NULL - Key or key value pairs to set string
$value
= NULL - Value to set to a key mixed
public function post($key = null, $value = null);
Gets or sets HTTP query string.
mixed
$key
= NULL - Key or key value pairs to set string
$value
= NULL - Value to set to a key mixed
public function query($key = null, $value = null);
Gets the URI of this request, optionally allows setting of Route specific parameters during the URI generation. If no parameters are passed, the request will use the default values defined in the Route.
string
public function uri();
Gets or sets the HTTP body to the request or response. The body is included after the header, separated by a single empty new line.
string
$content
= NULL - Content to set to the object string
void
public function body($content = null);
Gets or sets HTTP headers to the request or response. All headers are included immediately after the HTTP protocol definition during transmission. This method provides a simple array or key/value interface to the headers.
mixed
$key
= NULL - Key or array of key/value pairs to set string
$value
= NULL - Value to set to the supplied key mixed
public function headers($key = null, $value = null);
Gets or sets the HTTP protocol. The standard protocol to use
is HTTP/1.1
.
string
$protocol
= NULL - Protocol to set to the request/response mixed
public function protocol($protocol = null);
Renders the HTTP_Interaction to a string, producing
string
public function render();