add clear
This commit is contained in:
@@ -666,7 +666,11 @@ class HttpClient
|
||||
}
|
||||
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->parseHeaderMat());
|
||||
|
||||
$headers = $this->parseHeaderMat();
|
||||
if (!empty($headers) && is_array($headers)) {
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
|
||||
|
||||
if (file_exists($cert = $this->getSslCertFile())) {
|
||||
|
||||
@@ -42,6 +42,7 @@ class Authorization extends AfficialAccount
|
||||
$requestParam['lang'] = 'zh_CN';
|
||||
|
||||
$client = HttpClient::NewRequest();
|
||||
$client->setUseSwoole($this->getConfig()->isUsrSwoole());
|
||||
$result = $client->get($this->snsUserInfo, $requestParam);
|
||||
if ($result->isResultsOK()) {
|
||||
return $result;
|
||||
@@ -65,6 +66,7 @@ class Authorization extends AfficialAccount
|
||||
$requestParam['grant_type'] = 'authorization_code';
|
||||
|
||||
$client = HttpClient::NewRequest();
|
||||
$client->setUseSwoole($this->getConfig()->isUsrSwoole());
|
||||
return $client->get($this->oauth2, $requestParam);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user