From adf09f5695b48160004b8284d3a422bfaf51c4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 24 Dec 2021 11:49:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AsyncClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AsyncClient.php b/src/AsyncClient.php index 604bfbd..7ebf5f1 100644 --- a/src/AsyncClient.php +++ b/src/AsyncClient.php @@ -92,6 +92,7 @@ class AsyncClient extends ClientAbstracts $path = $this->setParams($path, $data); $this->withAddedHeader('Accept', ' text/html,application/xhtml+xml,application/json,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'); + $this->withAddedHeader('Accept-Encoding', 'gzip, deflate'); $this->withAddedHeader('Content-Length', $this->getData()->getSize()); $this->execute($path, $this->getData()->getContents()); @@ -117,7 +118,7 @@ class AsyncClient extends ClientAbstracts [$header, $body] = explode("\r\n\r\n", $revice); - var_dump($body); + var_dump((string)$body); $header = explode("\r\n", $header); $status = array_shift($header);