add clear

This commit is contained in:
as2252258@163.com
2020-01-09 18:57:08 +08:00
parent ab2e7e3900
commit baf07b7ab2
2 changed files with 8 additions and 8 deletions
-8
View File
@@ -528,9 +528,6 @@ class HttpClient
return $body;
}
$type = $data['content-type'];
if ($this->isXml($body)) {
return Help::toArray($body);
}
if (strpos($type, 'text/html') !== false) {
return $body;
} else if (strpos($type, 'json') !== false) {
@@ -543,11 +540,6 @@ class HttpClient
return $body;
}
private function isXml($body)
{
return preg_match('/^<[a-zA-Z_]+>(.*?)?<\/[a-zA-Z_]+>$/', $body);
}
/**
* @param $headers
* @return array