add clear
This commit is contained in:
@@ -469,13 +469,10 @@ class HttpClient
|
||||
}
|
||||
if (strpos($type, 'json') !== false) {
|
||||
return json_decode($body, true);
|
||||
} else if (strpos($type, 'xml') !== false || strpos($type, 'plain') !== false) {
|
||||
if (!is_null($newBody = json_decode($body, true))) {
|
||||
return $newBody;
|
||||
}
|
||||
} 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);
|
||||
} else {
|
||||
return $body;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user