$ipAddress
$ipAddress : string
IP address of the current user.
Class OutgoingRequest
A lightweight HTTP client for sending synchronous HTTP requests via cURL.
$response : \CodeIgniter\HTTP\Response
The response object associated with this request
$baseURI : \CodeIgniter\HTTP\URI
The URI associated with this request
__construct(\Config\App $config, \CodeIgniter\HTTP\URI $uri, \CodeIgniter\HTTP\ResponseInterface $response = null, array $options = array())
Takes an array of options to set the following possible class properties:
\Config\App | $config | |
\CodeIgniter\HTTP\URI | $uri | |
\CodeIgniter\HTTP\ResponseInterface | $response | |
array | $options |
setMethod(string $method) : \CodeIgniter\HTTP\Request
Sets the request method. Used when spoofing the request.
string | $method |
getServer(string|array|null $index = null, integer|null $filter = null, null $flags = null) : mixed
Fetch an item from the $_SERVER array.
string|array|null | $index | Index for item to be fetched from $_SERVER |
integer|null | $filter | A filter name to be applied |
null | $flags |
fetchGlobal(string $method, string|array|null $index = null, integer|null $filter = null, mixed $flags = null) : mixed
Fetches one or more items from a global, like cookies, get, post, etc.
Can optionally filter the input when you retrieve it by passing in a filter.
If $type is an array, it must conform to the input allowed by the filter_input_array method.
http://php.net/manual/en/filter.filters.sanitize.php
string | $method | Input filter constant |
string|array|null | $index | |
integer|null | $filter | Filter constant |
mixed | $flags |
setBody( $data) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Sets the body of the current message.
$data |
appendBody( $data) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Appends data to the body of the current message.
$data |
getHeader(string $name) : array|\CodeIgniter\HTTP\Header
Returns a single header object. If multiple headers with the same name exist, then will return an array of header objects.
string | $name |
getHeaderLine(string $name) : string
Retrieves a comma-separated string of the values for a single header.
This method returns all of the header values of the given case-insensitive header name as a string concatenated together using a comma.
NOTE: Not all header values may be appropriately represented using comma concatenation. For such headers, use getHeader() instead and supply your own delimiter when concatenating.
string | $name |
setHeader(string $name, array|null|string $value) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Sets a header and it's value.
string | $name | |
array|null|string | $value |
removeHeader(string $name) : \CodeIgniter\HTTP\Message
Removes a header from the list of headers we track.
string | $name |
appendHeader(string $name, string $value) : \CodeIgniter\HTTP\Message
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
string | $name | |
string | $value |
prependHeader(string $name, string $value) : \CodeIgniter\HTTP\Message
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
string | $name | |
string | $value |
setProtocolVersion(string $version) : \CodeIgniter\HTTP\Message
Sets the HTTP protocol version.
string | $version |
request( $method, string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Sends an HTTP request to the specified $url. If this is a relative URL, it will be merged with $this->baseURI to form a complete URL.
$method | ||
string | $url | |
array | $options |
get(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a GET request.
string | $url | |
array | $options |
delete(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a DELETE request.
string | $url | |
array | $options |
head(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a HEAD request.
string | $url | |
array | $options |
options(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending an OPTIONS request.
string | $url | |
array | $options |
patch(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a PATCH request.
string | $url | |
array | $options |
post(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a POST request.
string | $url | |
array | $options |
put(string $url, array $options = array()) : \CodeIgniter\HTTP\ResponseInterface
Convenience method for sending a PUT request.
string | $url | |
array | $options |
send(string $method, string $url) : \CodeIgniter\HTTP\ResponseInterface
Fires the actual cURL request.
string | $method | |
string | $url |