add clear
This commit is contained in:
@@ -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'] = '';
|
||||
|
||||
Reference in New Issue
Block a user