add clear

This commit is contained in:
2020-04-03 17:27:30 +08:00
parent 339532536f
commit 6fc876f59d
+1 -1
View File
@@ -623,7 +623,7 @@ class HttpClient
if (is_array($body)) {
return $body;
}
$type = $data['content-type'];
$type = $data['content-type'] ?? 'text/html';
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {