Requests_Session::request()publicWP 1.0

Main interface for HTTP requests

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

{} Это метод класса: Requests_Session{}

Хуков нет.




$Requests_Session = new Requests_Session();
$Requests_Session->request( $url, $headers, $data, $type, $options );
$url(строка) (обязательный)
URL to request
Extra headers to send with the request
По умолчанию: array()
Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
По умолчанию: array()
HTTP request type (use Requests constants)
По умолчанию: Requests::GET
Options for the request (see Requests::request())
По умолчанию: array()


Код Requests_Session::request() WP 6.0.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']);