Example #1
0
 public function onCompletion()
 {
     $ch = $this->curlHandle;
     $this->checkForError($ch);
     $this->curlInfo = curl_getinfo($ch);
     $response = new Response();
     $response->url = $this->url;
     $response->body = $this->receivedBody;
     $response->header = $this->receivedHeader;
     $response->received = new \DateTime();
     $response->parseCurlInfo($this->curlInfo);
     $response->contentLanguage = $response->getHeader('Content-Language', '\\n');
     $this->response = $response;
     $this->closeHandle();
 }