WordPress at a glance
function is not described

Requests::get_default_options() protected WP 1.0

Get the default options

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

No Hooks.

Return

Array. Default option values

Usage

$result = Requests::get_default_options( $multirequest );
$multirequest(true|false)
Is this a multirequest?

Notes

  • See: Requests::request() for values returned by this method

Code of Requests::get_default_options() WP 5.7

<?php
protected static function get_default_options($multirequest = false) {
	$defaults = array(
		'timeout' => 10,
		'connect_timeout' => 10,
		'useragent' => 'php-requests/' . self::VERSION,
		'protocol_version' => 1.1,
		'redirected' => 0,
		'redirects' => 10,
		'follow_redirects' => true,
		'blocking' => true,
		'type' => self::GET,
		'filename' => false,
		'auth' => false,
		'proxy' => false,
		'cookies' => false,
		'max_bytes' => false,
		'idn' => true,
		'hooks' => null,
		'transport' => null,
		'verify' => Requests::get_certificate_path(),
		'verifyname' => true,
	);
	if ($multirequest !== false) {
		$defaults['complete'] = null;
	}
	return $defaults;
}