WP_Http::head

Advertisement

Summery Summery

Uses the HEAD HTTP method.

Syntax Syntax

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

Description Description

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

Parameters Parameters

$url

(Required) The request URL.

$args

(Optional) Override the defaults.

Default value: array()

Return Return

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

Source Source

File: wp-includes/class-http.php

		return $this->request( $url, $parsed_args );
	}

	/**
	 * Parses the responses and splits the parts into headers and body.

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply