WP_Http_Streams::request

SummerySummery

Send a HTTP request to a URI using PHP Streams.

Syntax

WP_Http_Streams::request( string $url, string|array $args = array() )

ParametersParameters

$url

(string) (Required) The request URL.

$args

(string|array) (Optional) Override the defaults.

Default value: array()

ReturnReturn

(array|WP_Error) Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
2.7.0 Introduced.

See alsoSee also

Scroll to Top