diff --git a/common/HttpClient.php b/common/HttpClient.php index afa0e4d..c66ff85 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -437,8 +437,6 @@ class HttpClient if ($status != 200) { return new Result(['code' => 500, 'message' => $body, 'header' => $header]); } - - var_dump($output);exit; return $this->structure($this->resolve($header, $body), $data, $header); } catch (\Exception $exception) { return new Result(['code' => 500, 'message' => $exception->getMessage(), 'header' => []]); @@ -468,7 +466,7 @@ class HttpClient $type = $data['Content-Type'] ?? $data['content-type']; if (strpos($type, 'json') !== false) { return json_decode($body, true); - } else if (strpos($type, 'xml') !== false) { + } else if (strpos($type, 'xml') !== false || strpos($type, 'plain') !== false) { $data = simplexml_load_string($body, 'SimpleXMLElement', LIBXML_NOCDATA); return json_decode(json_encode($data), TRUE); } else if (strpos($type, 'plain') !== false) {