add clear

This commit is contained in:
as2252258@163.com
2020-01-03 11:55:14 +08:00
parent f52d8ff4a8
commit d89a05bc07
+8 -2
View File
@@ -467,10 +467,16 @@ class HttpClient
if (is_array($body)) {
return $body;
}
if (strpos($type, 'html') !== false) {
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {
return Help::toArray($body);
} else if (strpos($type, 'xml') !== false) {
return Help::toArray($body);
} else if (strpos($type, 'plain') !== false) {
return Help::toArray($body);
}
return Help::toArray($body);
return $body;
}
/**