add clear
This commit is contained in:
@@ -463,10 +463,10 @@ class HttpClient
|
|||||||
*/
|
*/
|
||||||
private function resolve($data, $body)
|
private function resolve($data, $body)
|
||||||
{
|
{
|
||||||
$type = $data['Content-Type'] ?? $data['content-type'];
|
|
||||||
if (is_array($body)) {
|
if (is_array($body)) {
|
||||||
return $body;
|
return $body;
|
||||||
}
|
}
|
||||||
|
$type = $data['Content-Type'] ?? $data['content-type'];
|
||||||
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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user