add clear

This commit is contained in:
as2252258@163.com
2020-01-02 11:45:56 +08:00
parent 224bd81184
commit 77a925ccc7
+3
View File
@@ -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) {