WP_Http::head( string $url, string|array $args = array() )
Uses the HEAD HTTP method.
Description
Used for sending data that is expected to be in the body.
Parameters
- $url
-
(Required) The request URL.
- $args
-
(Optional) Override the defaults.
Default value: array()
Return
(array|WP_Error) Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
Source
File: wp-includes/class-http.php
public function head($url, $args = array()) {
$defaults = array('method' => 'HEAD');
$r = wp_parse_args( $args, $defaults );
return $this->request($url, $r);
}
Changelog
Version | Description |
---|---|
WP-2.7.0 | Introduced. |