add clear

This commit is contained in:
as2252258@163.com
2020-01-03 11:56:06 +08:00
parent d89a05bc07
commit 2cc181bf7b
+1 -1
View File
@@ -463,10 +463,10 @@ class HttpClient
*/
private function resolve($data, $body)
{
$type = $data['Content-Type'] ?? $data['content-type'];
if (is_array($body)) {
return $body;
}
$type = $data['Content-Type'] ?? $data['content-type'];
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {