Revert "改名"
This reverts commit fdf58326
This commit is contained in:
+2
-4
@@ -114,9 +114,9 @@ class AsyncClient extends ClientAbstracts
|
||||
}
|
||||
}
|
||||
$this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content);
|
||||
$revice = $this->client->recv();
|
||||
$receive = $this->client->recv();
|
||||
|
||||
[$header, $body] = explode("\r\n\r\n", $revice);
|
||||
[$header, $body] = explode("\r\n\r\n", $receive);
|
||||
|
||||
$header = explode("\r\n", $header);
|
||||
$status = array_shift($header);
|
||||
@@ -124,8 +124,6 @@ class AsyncClient extends ClientAbstracts
|
||||
$this->setStatusCode(intval(explode(' ', $status)[1]));
|
||||
$this->parseResponseHeaders($header);
|
||||
$this->setBody($body);
|
||||
|
||||
var_dump($body);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -6,13 +6,13 @@ use Kiri\Context;
|
||||
|
||||
|
||||
/**
|
||||
* @mixin CoroutineClient|Curl
|
||||
* @mixin CoroutineClient|CurlClient
|
||||
*/
|
||||
class Client
|
||||
{
|
||||
|
||||
|
||||
private CoroutineClient|Curl|AsyncClient $abstracts;
|
||||
private CoroutineClient|CurlClient|AsyncClient $abstracts;
|
||||
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,7 @@ class Client
|
||||
if (Context::inCoroutine()) {
|
||||
$this->abstracts = new CoroutineClient($host, $port, $isSsl);
|
||||
} else {
|
||||
$this->abstracts = new Curl($host, $port, $isSsl);
|
||||
$this->abstracts = new CurlClient($host, $port, $isSsl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Class Curl
|
||||
* Class CurlClient
|
||||
* @package Http\Handler\Client
|
||||
*/
|
||||
class Curl extends ClientAbstracts
|
||||
class CurlClient extends ClientAbstracts
|
||||
{
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user