add HttpRequestManager timeout params

This commit is contained in:
Dan 2018-02-24 18:51:47 +08:00 committed by GitHub
parent ed0a0ac70c
commit bbcaed31fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,11 +32,12 @@ class HttpRequestManager extends RequestManager implements IRequestManager
* construct * construct
* *
* @param string $host * @param string $host
* @param int $timeout
* @return void * @return void
*/ */
public function __construct($host) public function __construct($host, $timeout = 1)
{ {
parent::__construct($host); parent::__construct($host, $timeout);
$this->client = new Client; $this->client = new Client;
} }