add clear

This commit is contained in:
2020-04-01 13:09:16 +08:00
parent b460fd2518
commit fa1c7b8363
+2 -4
View File
@@ -612,6 +612,7 @@ class HttpClient
return $body;
}
$type = $data['content-type'];
var_dump($data, $body);
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {
@@ -619,7 +620,7 @@ class HttpClient
} else if (strpos($type, 'xml') !== false) {
return Help::toArray($body);
} else if (strpos($type, 'plain') !== false) {
return json_decode($body, true);
return Help::toArray($body);
}
return $body;
}
@@ -658,9 +659,6 @@ class HttpClient
return $result;
}
var_dump($body, $_data);
if (is_string($body)) {
$result['code'] = 0;
$result['message'] = '';