WP_HTTP_Response::set_headers()publicWP 4.4.0

Sets all header values.

Method of the class: WP_HTTP_Response{}

No Hooks.

Return

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.5.4

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