You are here

protected function Github_HttpClient_Curl::doNormalCurlCall in Bibliography Module 7.2

1 call to Github_HttpClient_Curl::doNormalCurlCall()
Github_HttpClient_Curl::doCurlCall in modules/CiteProc/Github/HttpClient/Curl.php

File

modules/CiteProc/Github/HttpClient/Curl.php, line 98

Class

Github_HttpClient_Curl
Performs requests on GitHub API. API documentation should be self-explanatory.

Code

protected function doNormalCurlCall($curl, array $curlOptions) {
  curl_setopt_array($curl, $curlOptions);
  $response = curl_exec($curl);
  $headers = curl_getinfo($curl);
  $errorNumber = curl_errno($curl);
  $errorMessage = curl_error($curl);
  curl_close($curl);
  return compact('response', 'headers', 'errorNumber', 'errorMessage');
}