From d9a3839f4cd4dee71ad67491615b7c29bdf496f3 Mon Sep 17 00:00:00 2001 From: Marius Karstedt Date: Wed, 30 Jun 2021 19:40:28 +0200 Subject: [PATCH] Use defined headers --- src/Engine/Socket.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Engine/Socket.php b/src/Engine/Socket.php index c629d4d..84729a1 100644 --- a/src/Engine/Socket.php +++ b/src/Engine/Socket.php @@ -189,6 +189,10 @@ public function request($uri, $headers = [], $options = []) } } + if(isset($this->options['headers'])){ + $headers = array_merge($headers, $this->options['headers']); + } + $request = array_merge([ sprintf('%s %s HTTP/1.1', strtoupper($method), $uri), sprintf('Host: %s', $this->parsed['host'] . ':' . $this->parsed['port']),