WP_HTTP_Response::set_headerspublicWP 4.4.0

Sets all header values.

Method of the class: WP_HTTP_Response{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WP_HTTP_Response = new WP_HTTP_Response();
$WP_HTTP_Response->set_headers( $headers );
$headers(array) (required)
Map of header name to header value.

Changelog

Since 4.4.0 Introduced.

WP_HTTP_Response::set_headers() code WP 6.8.1

public function set_headers( $headers ) {
	$this->headers = $headers;
}