WordPress at a glance
function is not described

WP_HTTP_Requests_Response::set_headers() public WP 4.6.0

Sets all header values.

{} It's a method of the class: WP_HTTP_Requests_Response{}

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 4.6.0 Introduced.

Code of WP_HTTP_Requests_Response::set_headers() WP 5.7.2

<?php
public function set_headers( $headers ) {
	$this->response->headers = new Requests_Response_Headers( $headers );
}