add clear

This commit is contained in:
2020-05-22 15:25:50 +08:00
parent 6c1c1a379b
commit 35696bb8fc
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -710,7 +710,7 @@ class HttpClient
if (is_array($body)) {
return $body;
}
$type = $data['Content-Type'] ?? 'text/html';
$type = $data['content-type'] ?? 'text/html';
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {
-3
View File
@@ -142,9 +142,6 @@ class PublicTemplate extends SmallProgram
if (!empty($this->miniprogram)) {
$default['miniprogram'] = $this->miniprogram;
}
$params = json_encode($default, JSON_UNESCAPED_UNICODE);
$this->request->setIsSSL(true);
$this->request->addHeader('Content-Type', 'application/json');
$this->request->setErrorField('errcode');