add clear

This commit is contained in:
as2252258@163.com
2020-01-03 11:43:20 +08:00
parent 2ca6eb7b41
commit da21f45554
+3
View File
@@ -463,6 +463,9 @@ class HttpClient
*/
private function resolve($data, $body)
{
if (is_array($body)) {
return $body;
}
$type = $data['Content-Type'] ?? $data['content-type'];
if (strpos($type, 'json') !== false) {
return json_decode($body, true);