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'] = '';