diff --git a/src/AsyncClient.php b/src/AsyncClient.php index 398bd68..36ae3ec 100644 --- a/src/AsyncClient.php +++ b/src/AsyncClient.php @@ -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); } diff --git a/src/Client.php b/src/Client.php index a38488b..3295a99 100644 --- a/src/Client.php +++ b/src/Client.php @@ -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); } } diff --git a/src/Curl.php b/src/CurlClient.php similarity index 98% rename from src/Curl.php rename to src/CurlClient.php index 1d9c3fa..12dd994 100644 --- a/src/Curl.php +++ b/src/CurlClient.php @@ -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 { /**