add clear
This commit is contained in:
@@ -116,7 +116,7 @@ abstract class Subject extends Miniprogarampage
|
||||
$params = json_encode($params, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->addHeader('content-type', 'application/json');
|
||||
$this->request->addHeader('Content-Type', 'application/json');
|
||||
|
||||
$this->request->setErrorField('errcode');
|
||||
$this->request->setErrorMsgField('errmsg');
|
||||
|
||||
@@ -128,7 +128,7 @@ abstract class Template extends Miniprogarampage
|
||||
}
|
||||
$params = json_encode($params, JSON_UNESCAPED_UNICODE);
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->addHeader('content-type', 'application/json');
|
||||
$this->request->addHeader('Content-Type', 'application/json');
|
||||
$this->request->setErrorField('errcode');
|
||||
$this->request->setErrorMsgField('errmsg');
|
||||
$result = $this->request->post($url, $params);
|
||||
|
||||
@@ -706,7 +706,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) {
|
||||
|
||||
@@ -85,7 +85,7 @@ class SourceMaterial extends AfficialAccount
|
||||
{
|
||||
$uploadInfo['media'] = new \CURLFile($file);
|
||||
$uploadInfo['form-data[filename]'] = $uploadInfo['media']->getFilename();
|
||||
$uploadInfo['form-data[content-type]'] = $uploadInfo['media']->getMimeType();
|
||||
$uploadInfo['form-data[Content-Type]'] = $uploadInfo['media']->getMimeType();
|
||||
|
||||
$accessToken = $this->config->getAccessToken();
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ class Message extends SmallProgram
|
||||
|
||||
$real_path = new \CURLFile(realpath($filePath));
|
||||
|
||||
$data = array("media" => $real_path, 'form-data[filename]' => $filePath, 'form-data[content-type]' => $mime);
|
||||
$data = array("media" => $real_path, 'form-data[filename]' => $filePath, 'form-data[Content-Type]' => $mime);
|
||||
if ($isPermanent && $mime == 'video/mp3') {
|
||||
$data = ['media' => $real_path, 'description[title]' => $title, 'description[introduction]' => $introduction];
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ class PublicTemplate extends SmallProgram
|
||||
$params = json_encode($default, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->addHeader('content-type', 'application/json');
|
||||
$this->request->addHeader('Content-Type', 'application/json');
|
||||
$this->request->setErrorField('errcode');
|
||||
$this->request->setErrorMsgField('errmsg');
|
||||
$result = $this->request->post($url, $default);
|
||||
|
||||
Reference in New Issue
Block a user