diff --git a/common/HttpClient.php b/common/HttpClient.php index 110f62d..a5ed285 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -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; } /**