diff --git a/src/AsyncClient.php b/src/AsyncClient.php index a175c78..2ef9c39 100644 --- a/src/AsyncClient.php +++ b/src/AsyncClient.php @@ -93,12 +93,21 @@ class AsyncClient extends ClientAbstracts $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('Accept-Encoding', 'gzip, deflate'); $this->withAddedHeader('Content-Length', $this->getData()->getSize()); + $this->execute($path, $this->getData()->getContents()); + } + + + /** + * @param string $path + * @param string $content + * @return void + */ + private function execute(string $path, string $content) + { $array = []; $array[] = strtoupper($this->getMethod()) . ' ' . $path . ' HTTP/1.1'; if (!empty($this->getHeader())) {