1
This commit is contained in:
+1
-16
@@ -58,12 +58,6 @@ class AsyncClient extends ClientAbstracts
|
||||
{
|
||||
try {
|
||||
$this->generate_client($data, ...$url);
|
||||
if ($this->client->statusCode < 0) {
|
||||
throw new Exception($this->client->errMsg);
|
||||
}
|
||||
// $this->setStatusCode($this->client->getStatusCode());
|
||||
// $this->setBody($this->client->getBody());
|
||||
// $this->setResponseHeader($this->client->headers);
|
||||
} catch (\Throwable $exception) {
|
||||
Kiri::getDi()->get(Logger::class)->error('rpc', [$exception]);
|
||||
$this->setStatusCode(-1);
|
||||
@@ -114,22 +108,13 @@ class AsyncClient extends ClientAbstracts
|
||||
|
||||
[$header, $body] = explode("\r\n\r\n", $revice);
|
||||
|
||||
var_dump($revice);
|
||||
|
||||
$header = explode("\r\n", $header);
|
||||
|
||||
$status = array_shift($header);
|
||||
|
||||
[$path, $status, $pro] = explode(' ', $status);
|
||||
|
||||
$this->setBody($body);
|
||||
$this->setStatusCode(intval($status));
|
||||
$this->setStatusCode(intval(explode(' ', $status)[1]));
|
||||
$this->setResponseHeader($header);
|
||||
|
||||
//
|
||||
// $this->client->setHeaders($this->getHeader());
|
||||
// $this->client->setMethod(strtoupper($this->getMethod()));
|
||||
// $this->client->execute($this->setParams($path, $data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user