WP_Http::head( string $url, string|array $args = array() )

Uses the HEAD HTTP method.


Description Description

Used for sending data that is expected to be in the body.


Top ↑

Parameters Parameters

$url

(string) (Required) The request URL.

$args

(string|array) (Optional) Override the defaults.

Default value: array()


Top ↑

Return Return

(array|WP_Error) Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error.


Top ↑

Source Source

File: wp-includes/class-http.php

	public function head( $url, $args = array() ) {
		$defaults    = array( 'method' => 'HEAD' );
		$parsed_args = wp_parse_args( $args, $defaults );
		return $this->request( $url, $parsed_args );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.