Skip to content

Commit 4fad5ac

Browse files
committed
RestClient: fixed addHeader
1 parent 419dd32 commit 4fad5ac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/RestClient.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class RestClient
3636
* headers are http headers which will be added on every request
3737
* @var array
3838
*/
39-
private $headers = [];
39+
protected $headers = [];
4040
/**
4141
* request executes a request to the SinusBot API
4242
*
@@ -88,9 +88,7 @@ protected function request($path, $method = "GET", $payload = null, $encoded = f
8888
*/
8989
public function addHeader($key, $value)
9090
{
91-
array_push($this->headers, [
92-
$key => $value,
93-
]);
91+
array_push($this->headers, $key.": ".$value);
9492
}
9593
/**
9694
* setAuthToken overrides the auth token

0 commit comments

Comments
 (0)