lithium\net\http\Service::__construct()
Constructor. Initializes a new Service
instance with the default HTTP request settings
and transport- and format-handling classes.
Parameters
-
array
$config
Available configuration options are:
'persistent'
boolean'scheme'
string'host'
string'port'
integer'timeout'
integer'auth'
boolean'username'
string'password'
string'encoding'
string'socket'
string
Returns
voidSource
public function __construct(array $config = []) {
$defaults = [
'persistent' => false,
'scheme' => 'http',
'host' => 'localhost',
'port' => null,
'timeout' => 30,
'auth' => null,
'username' => null,
'password' => null,
'encoding' => 'UTF-8',
'socket' => 'Context'
];
parent::__construct($config + $defaults);
}