HTTP request method uses HTTP extension to retrieve the url.
Requires the HTTP extension to be installed. This would be the preferred transport since it can handle a lot of the problems that forces the others to use the HTTP version 1.0. Even if PHP 5.2+ is being used, it doesn't mean that the HTTP extension will be enabled.
package | WordPress |
---|---|
subpackage | HTTP |
since | 2.7.0 |
request(string $url, \str|array $args = array()
) : array
Does not support non-blocking.
access | public |
---|---|
since | 2.7 |
string
\str
array
Optional. Override the defaults.
array
'headers', 'body', 'cookies' and 'response' keys.test($args = array()
) : boolean
static | |
---|---|
since | 2.7.0 |
boolean
False means this class can not be used, true means it can.