WPDev.one
Core Class

WP_Http

class WP_Http // Constructor: function Object() { [native code] }

Core class used for managing HTTP transports and making HTTP requests.

Methods 18 methods

Method / Return Description
request()
(array

Send an HTTP request to a URI.

Parameters: $url: mixed, $args: mixed
normalize_cookies()
WpOrg\Requests\Cookie\Jar

Normalizes cookies for using in Requests.

Parameters: $cookies: mixed
browser_redirect_compatibility()
void

Match redirect behavior to browser handling.

Parameters: $location: mixed, $headers: mixed, $data: mixed, $options: mixed, $original: mixed
validate_redirects()
void

Validate redirected URLs.

Parameters: $location: mixed
_get_first_available_transport()
(string

Tests which transports are capable of supporting the request.

Parameters: $args: mixed, $url: mixed
_dispatch_request()
(array

Dispatches a HTTP request to a supporting transport.

Parameters: $url: mixed, $args: mixed
post()
(array

Uses the POST HTTP method.

Parameters: $url: mixed, $args: mixed
get()
(array

Uses the GET HTTP method.

Parameters: $url: mixed, $args: mixed
head()
(array

Uses the HEAD HTTP method.

Parameters: $url: mixed, $args: mixed
processResponse()
array

Parses the responses and splits the parts into headers and body.

Parameters: $response: mixed
processHeaders()
array

Transforms header string into an array.

Parameters: $headers: mixed, $url: mixed
buildCookieHeader()
void

Takes the arguments for a ::request() and checks for the cookie array.

Parameters: $r: mixed
chunkTransferDecode()
string

Decodes chunk transfer-encoding, based off the HTTP 1.1 specification.

Parameters: $body: mixed
block_request()
bool

Determines whether an HTTP API request to the given URL should be blocked.

Parameters: $uri: mixed
parse_url()
(bool

Used as a wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7.

Parameters: $url: mixed
make_absolute_url()
string

Converts a relative URL to an absolute URL relative to a given URL.

Parameters: $maybe_relative_path: mixed, $url: mixed
handle_redirects()
(array

Handles an HTTP redirect and follows it if appropriate.

Parameters: $url: mixed, $args: mixed, $response: mixed
is_ip_address()
(int

Determines if a specified string represents an IP address or not.

Parameters: $maybe_ip: mixed

Class Information

Since Version
2.7.0
Source File
wp-includes/class-wp-http.php
Advertisement