WP_HTTP_Response::__construct

Advertisement

Summery Summery

Constructor.

Syntax Syntax

WP_HTTP_Response::__construct( mixed $data = null, int $status = 200, array $headers = array() )

Parameters Parameters

$data

(mixed) (Optional) Response data.

Default value: null

$status

(int) (Optional) HTTP status code.

Default value: 200

$headers

(array) (Optional) HTTP header map.

Default value: array()

Source Source

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

	public function __construct( $data = null, $status = 200, $headers = array() ) {
		$this->set_data( $data );
		$this->set_status( $status );
		$this->set_headers( $headers );
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?