add clear
This commit is contained in:
@@ -472,7 +472,11 @@ class HttpClient
|
||||
return json_decode($body, true);
|
||||
} else if (strpos($type, 'xml') !== false) {
|
||||
$data = simplexml_load_string($body, 'SimpleXMLElement', LIBXML_NOCDATA);
|
||||
return json_decode(json_encode($data), TRUE);
|
||||
$encode = json_encode($data);
|
||||
if (is_array($encode)) {
|
||||
return $encode;
|
||||
}
|
||||
return json_decode($encode, TRUE);
|
||||
} else if (strpos($type, 'plain') !== false) {
|
||||
return json_decode($data, TRUE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user