Skip to content

Commit

Permalink
RestClient: fixed addHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Sep 11, 2018
1 parent 419dd32 commit 4fad5ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/RestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fad5ac

Please sign in to comment.