Example #1
0
 public function testGetWithTimeout()
 {
     $curl = new Curl();
     $curl->setMethod('GET');
     $curl->setOption(CURLOPT_URL, 'http://httpbin.org/delay/2');
     $curl->setTimeout(4);
     $response = $curl->execute();
 }
Example #2
0
 public function testImap()
 {
     $this->markTestSkipped('No credentials');
     $curl = new Curl();
     $curl->setTimeout(4);
     $curl->setOption(CURLOPT_PROTOCOLS, CURLPROTO_IMAP | CURLPROTO_IMAPS);
     $curl->setUrl('imaps://imap.gmail.com/INBOX');
     $curl->setMethod('EXAMINE');
     $curl->setCredentials(new BasicCredentials('', ''));
     $response = $curl->execute();
 }