From 089f52c585c22484cdd07bd457de5321f2525f48 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Fri, 3 Jan 2020 11:47:29 +0800 Subject: [PATCH] add clear --- common/HttpClient.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/common/HttpClient.php b/common/HttpClient.php index 6fc68ff..110f62d 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -467,15 +467,10 @@ class HttpClient if (is_array($body)) { return $body; } - if (strpos($type, 'json') !== false) { - return json_decode($body, true); - } else if (strpos($type, 'xml') !== false) { - return Help::toArray($body); - } else if (strpos($type, 'plain') !== false) { - return Help::toArray($body); - } else { + if (strpos($type, 'html') !== false) { return $body; } + return Help::toArray($body); } /**