WordPress at Your Fingertips
function is not described

Requests_Session::__construct() public WP 1.0

Create a new session

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

No Hooks.


null. Nothing.


$Requests_Session = new Requests_Session();
$Requests_Session->__construct( $url, $headers, $data, $options );
Base URL for requests
Default headers for requests
Default data for requests
Default options for requests

Code of Requests_Session::__construct() WP 5.8

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();