File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments