Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2021-12-28 12:06:53 +08:00
parent 98d9cee8b0
commit 2623deb63f
3 changed files with 7 additions and 9 deletions
+2 -4
View File
@@ -114,9 +114,9 @@ class AsyncClient extends ClientAbstracts
} }
} }
$this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content); $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); $header = explode("\r\n", $header);
$status = array_shift($header); $status = array_shift($header);
@@ -124,8 +124,6 @@ class AsyncClient extends ClientAbstracts
$this->setStatusCode(intval(explode(' ', $status)[1])); $this->setStatusCode(intval(explode(' ', $status)[1]));
$this->parseResponseHeaders($header); $this->parseResponseHeaders($header);
$this->setBody($body); $this->setBody($body);
var_dump($body);
} }
+3 -3
View File
@@ -6,13 +6,13 @@ use Kiri\Context;
/** /**
* @mixin CoroutineClient|Curl * @mixin CoroutineClient|CurlClient
*/ */
class Client class Client
{ {
private CoroutineClient|Curl|AsyncClient $abstracts; private CoroutineClient|CurlClient|AsyncClient $abstracts;
/** /**
@@ -25,7 +25,7 @@ class Client
if (Context::inCoroutine()) { if (Context::inCoroutine()) {
$this->abstracts = new CoroutineClient($host, $port, $isSsl); $this->abstracts = new CoroutineClient($host, $port, $isSsl);
} else { } else {
$this->abstracts = new Curl($host, $port, $isSsl); $this->abstracts = new CurlClient($host, $port, $isSsl);
} }
} }
+2 -2
View File
@@ -12,10 +12,10 @@ use Psr\Http\Message\ResponseInterface;
/** /**
* Class Curl * Class CurlClient
* @package Http\Handler\Client * @package Http\Handler\Client
*/ */
class Curl extends ClientAbstracts class CurlClient extends ClientAbstracts
{ {
/** /**