add clear

This commit is contained in:
2020-05-21 17:07:42 +08:00
parent 8152b1b85e
commit 3c5f02d52a
+1 -1
View File
@@ -554,7 +554,7 @@ class HttpClient
return $data; return $data;
} }
} }
$contentType = $this->header['Content-Type'] ?? 'application/json'; $contentType = $this->header['Content-Type'] ?? null;
if (strpos($contentType, 'json') !== false) { if (strpos($contentType, 'json') !== false) {
return Help::toJson($data); return Help::toJson($data);
} else if (strpos($contentType, 'xml') !== false) { } else if (strpos($contentType, 'xml') !== false) {