From fa1c7b83637676b169a471815f5027501941e095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 1 Apr 2020 13:09:16 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 575f1ad..202ade0 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -612,6 +612,7 @@ class HttpClient return $body; } $type = $data['content-type']; + var_dump($data, $body); if (strpos($type, 'text/html') !== false) { return $body; } else if (strpos($type, 'json') !== false) { @@ -619,7 +620,7 @@ class HttpClient } else if (strpos($type, 'xml') !== false) { return Help::toArray($body); } else if (strpos($type, 'plain') !== false) { - return json_decode($body, true); + return Help::toArray($body); } return $body; } @@ -658,9 +659,6 @@ class HttpClient return $result; } - - var_dump($body, $_data); - if (is_string($body)) { $result['code'] = 0; $result['message'] = '';