add clear
This commit is contained in:
@@ -633,12 +633,9 @@ class HttpClient
|
|||||||
if (!empty($this->agent)) {
|
if (!empty($this->agent)) {
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
|
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
|
||||||
}
|
}
|
||||||
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());
|
||||||
if (!empty($this->getSslCertFile())) {
|
|
||||||
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
|
|
||||||
}
|
|
||||||
curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile());
|
curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile());
|
||||||
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
|
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置
|
||||||
|
|||||||
@@ -149,8 +149,8 @@ class PublicTemplate extends SmallProgram
|
|||||||
$this->request->addHeader('content-type', 'application/json');
|
$this->request->addHeader('content-type', 'application/json');
|
||||||
$this->request->setErrorField('errcode');
|
$this->request->setErrorField('errcode');
|
||||||
$this->request->setErrorMsgField('errmsg');
|
$this->request->setErrorMsgField('errmsg');
|
||||||
$result = $this->request->post($url, $params);
|
$result = $this->request->post($url, $default);
|
||||||
$result->append('postBody', $params);
|
$result->append('postBody', $default);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user