diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 8972fcc..697b2ea 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -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) { diff --git a/wchat/wx/PublicTemplate.php b/wchat/wx/PublicTemplate.php index 1547f2c..b7c92a0 100644 --- a/wchat/wx/PublicTemplate.php +++ b/wchat/wx/PublicTemplate.php @@ -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');