From 77a925ccc787cb91f62b5ef5eab92e27b09bba20 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 2 Jan 2020 11:45:56 +0800 Subject: [PATCH] add clear --- common/HttpClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/HttpClient.php b/common/HttpClient.php index 0feb21f..6ac7fc8 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -465,6 +465,9 @@ class HttpClient private function resolve($data, $body) { $type = $data['Content-Type'] ?? $data['content-type']; + if (is_array($body)) { + return $body; + } if (strpos($type, 'json') !== false) { return json_decode($body, true); } else if (strpos($type, 'xml') !== false) {