From 8d685b93e22ff8b7f32c62cff46df646490f3a9a Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 12 Dec 2021 04:10:15 +0800 Subject: [PATCH] 1 --- src/AsyncClient.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/AsyncClient.php b/src/AsyncClient.php index 2f108ee..904006e 100644 --- a/src/AsyncClient.php +++ b/src/AsyncClient.php @@ -87,13 +87,11 @@ class AsyncClient extends ClientAbstracts $this->client->set($this->settings()); if (!empty($this->getAgent())) { $this->withAddedHeader('User-Agent', $this->getAgent()); - } else { - $this->withAddedHeader('User-Agent', ' Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36'); } $path = $this->setParams($path, $data); - $this->withAddedHeader('Accept', ' text/html,application/xhtml+xml,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', ' 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());