Requests_Session::__construct() public WP 1.0
Create a new session
{} It's a method of the class: Requests_Session{}
No Hooks.
Return
Null. Nothing.
Usage
$Requests_Session = new Requests_Session(); $Requests_Session->__construct( $url, $headers, $data, $options );
- $url(string/null)
- Base URL for requests
Default: null - $headers(array)
- Default headers for requests
Default: array() - $data(array)
- Default data for requests
Default: array() - $options(array)
- Default options for requests
Default: array()
Code of Requests_Session::__construct() Requests Session:: construct WP 5.6
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();
}
}