WpOrg\Requests

Transport::requestpublicWP 1.0

Perform a request

Метод класса: Transport{}

Хуков нет.

Возвращает

Строку. Raw HTTP result

Использование

$Transport = new Transport();
$Transport->request( $url, $headers, $data, $options );
$url(строка) (обязательный)
URL to request.
$headers(массив)
Associative array of request headers.
По умолчанию: []
$data(строка|массив)
Data to send either as the POST body, or as parameters in the URL for a GET/HEAD.
По умолчанию: []
$options(массив)
Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation.
По умолчанию: []

Код Transport::request() WP 6.8.3

public function request($url, $headers = [], $data = [], $options = []);