WordPress at Your Fingertips

wp_remote_head() WP 1.0

Retrieve the raw response from the HTTP request using the HEAD method.

No Hooks.

Return

Array|WP_Error. The response or WP_Error on failure.

Usage

wp_remote_head( $url, $args );
$url(string) (required)
URL to retrieve.
$args(array)
Request arguments.
Default: empty array

Notes

Changelog

Since 2.7.0 Introduced.

Code of wp_remote_head() WP 5.8.1

function wp_remote_head( $url, $args = array() ) {
	$http = _wp_http_get_object();
	return $http->head( $url, $args );
}

HTTP API (curl remote)

No comments
    Log In