1
This commit is contained in:
+11
-2
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user