❇️ Inclut le client dans la librairie

This commit is contained in:
2017-09-28 22:33:47 +02:00
parent 272ab042d7
commit f7b6573375
3 changed files with 246 additions and 2 deletions

View File

@@ -18,9 +18,24 @@ class Account
* @param Client $client
* @param Config $config
*/
public function __construct(Client $client, Config $config)
public function __construct(Config $config)
{
$this->client = $client;
$this->client = new \Goutte\Client();
$this->client->setClient(
new \GuzzleHttp\Client([
'timeout' => 90,
'verify' => false,
'curl' => [
CURLOPT_TIMEOUT => 60,
CURLOPT_TIMEOUT_MS => 60,
CURLOPT_CONNECTTIMEOUT => 60,
],
'headers' => [
'User-Agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0',
],
])
);
$this->client->setMaxRedirects(10);
$this->config = $config;
}