WordPress at a glance
function is not described

WP_HTTP_Response::set_data() public WP 4.4.0

Sets the response data.

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

No Hooks.

Return

````. Null. Nothing.

Usage

$WP_HTTP_Response = new WP_HTTP_Response();
$WP_HTTP_Response->set_data( $data );
$data(mixed) (required)
Response data.

Changelog

Since 4.4.0 Introduced.

Code of WP_HTTP_Response::set_data() WP 5.7

<?php
public function set_data( $data ) {
	$this->data = $data;
}