Requests_Session::__construct

Advertisement

Summery Summery

Create a new session

Syntax Syntax

Requests_Session::__construct( string|null $url = null, array $headers = array(), array $data = array(), array $options = array() )

Parameters Parameters

$url

(string|null) (Optional) Base URL for requests

Default value: null

$headers

(array) (Optional) Default headers for requests

Default value: array()

$data

(array) (Optional) Default data for requests

Default value: array()

$options

(array) (Optional) Default options for requests

Default value: array()

Source Source

File: wp-includes/Requests/Session.php

	public function __construct($url = null, $headers = array(), $data = array(), $options = array()) {
		$this->url = $url;
		$this->headers = $headers;
		$this->data = $data;
		$this->options = $options;

		if (empty($this->options['cookies'])) {
			$this->options['cookies'] = new Requests_Cookie_Jar();
		}
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.