WordPress at a glance

wp_remote_head() WP 1.0

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

Возвращает

Array/WP_Error. The response or WP_Error on failure.

Works based on: _wp_http_get_object()

No Hooks.

Usage

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

Notes

  • See: wp_remote_request() For more information on the response array format.
  • See: WP_Http::request() For default arguments information.

Список изменений

С версии 2.7.0 Введена.

Code of wp_remote_head() WP 5.5.1

wp-includes/http.php
<?php
function wp_remote_head( $url, $args = array() ) {
	$http = _wp_http_get_object();
	return $http->head( $url, $args );
}

Related Functions

From tag: HTTP API (curl remote)

No comments
    Log In . Register