From 4fad5ac9a33e957a68f91b6cf0e3bab2825b8cfb Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 11 Sep 2018 19:42:35 +0200 Subject: [PATCH] RestClient: fixed addHeader --- src/RestClient.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/RestClient.php b/src/RestClient.php index ea079be..31b0db3 100644 --- a/src/RestClient.php +++ b/src/RestClient.php @@ -36,7 +36,7 @@ class RestClient * headers are http headers which will be added on every request * @var array */ - private $headers = []; + protected $headers = []; /** * request executes a request to the SinusBot API * @@ -88,9 +88,7 @@ protected function request($path, $method = "GET", $payload = null, $encoded = f */ public function addHeader($key, $value) { - array_push($this->headers, [ - $key => $value, - ]); + array_push($this->headers, $key.": ".$value); } /** * setAuthToken overrides the auth token