From 61606b2b132e2b6cfca4788b81ad9c4016892fa4 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 11 Dec 2021 17:28:42 +0800 Subject: [PATCH] 1 --- src/AsyncClient.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/AsyncClient.php b/src/AsyncClient.php index c0b23d2..bad6732 100644 --- a/src/AsyncClient.php +++ b/src/AsyncClient.php @@ -83,16 +83,13 @@ class AsyncClient extends ClientAbstracts $this->client->enableSSL(); } $this->client->set($this->settings()); - if (!empty($this->getAgent())) { - $this->withAddedHeader('User-Agent', $this->getAgent()); - } - $path = $this->setParams($path, $data); $content = $this->getData()->getContents(); $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('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'); $this->withAddedHeader('Accept-Encoding', 'gzip, deflate'); $this->withAddedHeader('Content-Length', $this->getData()->getSize());