Skip to content

Commit 3bdf969

Browse files
committed
Add RemoteLRS all request headers
1 parent 60aa5e6 commit 3bdf969

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/RemoteLRS.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class RemoteLRS implements LRSInterface
3333
protected $version;
3434
protected $auth;
3535
protected $proxy;
36+
protected $headers;
3637
protected $extended;
3738

3839
public function __construct() {
@@ -105,6 +106,12 @@ protected function sendRequest($method, $resource) {
105106
$http['proxy'] = $this->proxy;
106107
}
107108

109+
if (isset($this->headers) && count($this->headers) > 0) {
110+
foreach ($this->headers as $k => $v) {
111+
array_push($http['header'], "$k: $v");
112+
}
113+
}
114+
108115
if (isset($options['headers'])) {
109116
foreach ($options['headers'] as $k => $v) {
110117
array_push($http['header'], "$k: $v");
@@ -1167,4 +1174,10 @@ public function setProxy($value) {
11671174
return $this;
11681175
}
11691176
public function getProxy() { return $this->proxy; }
1177+
1178+
public function setHeaders($value) {
1179+
$this->headers = $value;
1180+
return $this;
1181+
}
1182+
public function getHeaders() { return $this->headers; }
11701183
}

0 commit comments

Comments
 (0)