WP_HTTP_Requests_Response::__construct() WordPress Method

The WP_HTTP_Requests_Response::__construct() function is used to construct an HTTP request response object. This function is used to set the headers, body, and status code of the response.

WP_HTTP_Requests_Response::__construct( Requests_Response $response, string $filename = '' ) #

Constructor.


Parameters

$response

(Requests_Response)(Required)HTTP response.

$filename

(string)(Optional) File name.

Default value: ''


Top ↑

Source

File: wp-includes/class-wp-http-requests-response.php

	public function __construct( Requests_Response $response, $filename = '' ) {
		$this->response = $response;
		$this->filename = $filename;
	}


Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.