add clear

This commit is contained in:
2020-05-22 15:15:08 +08:00
parent caf2960d4a
commit 4127dc283a
2 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -633,12 +633,9 @@ class HttpClient
if (!empty($this->agent)) {
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
}
if (!empty($this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
}
if (!empty($this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
}
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile());
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置
+2 -2
View File
@@ -149,8 +149,8 @@ class PublicTemplate extends SmallProgram
$this->request->addHeader('content-type', 'application/json');
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
$result = $this->request->post($url, $params);
$result->append('postBody', $params);
$result = $this->request->post($url, $default);
$result->append('postBody', $default);
return $result;
}