private function createClientHttp()
 {
     $httpClient = new Curl();
     $httpClient->setVerifyPeer(true);
     $httpClient->setTimeout(10);
     $httpClient->setMaxRedirects(5);
     $httpClient->setIgnoreErrors(true);
     return $httpClient;
 }
Beispiel #2
0
 public function __construct(Response $response, Request $request, Curl $client)
 {
     $this->response = $response;
     $request->setProtocolVersion(1.1);
     $request->addHeader('Content-Type: application/json');
     $this->request = $request;
     $client->setTimeout(5);
     $client->setIgnoreErrors(true);
     $this->client = $client;
 }