WordPress at Your Fingertips
function is not described

Requests_Session::request() public WP 1.0

Main interface for HTTP requests

This method initiates a request and sends it via a transport before parsing.

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

No Hooks.




$Requests_Session = new Requests_Session();
$Requests_Session->request( $url, $headers, $data, $type, $options );
$url(string) (required)
URL to request
Extra headers to send with the request
Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
HTTP request type (use Requests constants)
Options for the request (see Requests::request())


Code of Requests_Session::request() WP 5.7.2

public function request($url, $headers = array(), $data = array(), $type = Requests::GET, $options = array()) {
	$request = $this->merge_request(compact('url', 'headers', 'data', 'options'));

	return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']);