add clear
This commit is contained in:
@@ -430,13 +430,13 @@ class HttpClient
|
|||||||
if ($output === FALSE) {
|
if ($output === FALSE) {
|
||||||
return new Result(['code' => 500, 'message' => curl_error($ch)]);
|
return new Result(['code' => 500, 'message' => curl_error($ch)]);
|
||||||
}
|
}
|
||||||
list($header, $body) = explode("\r\n\r\n", $output, 2);
|
|
||||||
|
[$header, $body] = explode("\r\n\r\n", $output);
|
||||||
$header = explode(PHP_EOL, $header);
|
$header = explode(PHP_EOL, $header);
|
||||||
|
|
||||||
$status = (int)explode(' ', trim($header[0]))[1];
|
$status = (int)explode(' ', trim($header[0]))[1];
|
||||||
$header = $this->headerFormat($header);
|
$header = $this->headerFormat($header);
|
||||||
|
|
||||||
var_dump($header, $body);
|
|
||||||
|
|
||||||
if ($status != 200) {
|
if ($status != 200) {
|
||||||
return new Result(['code' => 500, 'message' => $body, 'header' => $header]);
|
return new Result(['code' => 500, 'message' => $body, 'header' => $header]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user