Requests::get_default_options

Advertisement

Summery Summery

Get the default options

Syntax Syntax

Requests::get_default_options( boolean $multirequest = false )

Parameters Parameters

$multirequest

(Optional) Is this a multirequest?

Default value: false

Return Return

(array) Default option values

Source Source

File: wp-includes/class-requests.php

	 * @return array Default option values
	 */
	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;
		}

Advertisement

See also See also

Advertisement

Leave a Reply