add clear

This commit is contained in:
2021-04-06 16:35:08 +08:00
parent 0569d1d752
commit c412df7252
+1 -1
View File
@@ -784,7 +784,6 @@ class HttpClient
return $body; return $body;
} }
$type = isset($data['content-type']) ? $data['content-type'] : (isset($data['Content-Type']) ? $data['Content-Type'] : 'text/html'); $type = isset($data['content-type']) ? $data['content-type'] : (isset($data['Content-Type']) ? $data['Content-Type'] : 'text/html');
var_dump($type, $body);
if (strpos($type, 'text/html') !== false) { if (strpos($type, 'text/html') !== false) {
return $body; return $body;
} else if (strpos($type, 'json') !== false) { } else if (strpos($type, 'json') !== false) {
@@ -792,6 +791,7 @@ class HttpClient
} else if (strpos($type, 'xml') !== false) { } else if (strpos($type, 'xml') !== false) {
return Help::xmlToArray($body); return Help::xmlToArray($body);
} else if (strpos($type, 'plain') !== false) { } else if (strpos($type, 'plain') !== false) {
var_dump($type, $body);
return Help::toArray($body); return Help::toArray($body);
} }
return $body; return $body;