HTTP request method uses Streams to retrieve the url.
Requires PHP 5.0+ and uses fopen with stream context. Requires that 'allow_url_fopen' PHP setting to be enabled.
Second preferred method for getting the URL, for PHP 5.
package | WordPress |
---|---|
subpackage | HTTP |
since | 2.7.0 |
request(string $url, \str|array $args = array()
) : array
access | public |
---|---|
since | 2.7.0 |
string
\str
array
Optional. Override the defaults.
array
'headers', 'body', 'cookies' and 'response' keys.test($args = array()
) : boolean
static | |
---|---|
access | public |
since | 2.7.0 |
boolean
False means this class can not be used, true means it can.