add clear

This commit is contained in:
2021-03-17 16:52:36 +08:00
parent 80833aacb8
commit 092e355850
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -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())) {
+2
View File
@@ -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);
}