使用HEAD方法从HTTP请求中检索原始响应。
原型
wp_remote_head( string $url, array $args = array() )
参数
$url
(string)
(Required)
要检索的网站网址。
$args
(array)
(Optional)
请求参数。
返回值
(WP_Error|array)
回应或
源文件
路径:wp-includes/http.php
<?php
...
function wp_remote_head($url, $args = array()) {
$http = _wp_http_get_object();
return $http->head( $url, $args );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_remote_head/