Skip to content

Commit 027759c

Browse files
authored
Merge pull request #67 from brianjmiller/qs-headers
Enable setting headers on `RemoteLRS.queryStatements`
2 parents 0192ace + e2604aa commit 027759c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/RemoteLRS.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,15 @@ public function queryStatements($query) {
560560
$requestCfg = array(
561561
'params' => $this->_queryStatementsRequestParams($query),
562562
);
563+
if (func_num_args() > 1) {
564+
$options = func_get_arg(1);
565+
566+
if (isset($options)) {
567+
if (isset($options['headers'])) {
568+
$requestCfg['headers'] = $options['headers'];
569+
}
570+
}
571+
}
563572

564573
$response = $this->sendRequest('GET', 'statements', $requestCfg);
565574

0 commit comments

Comments
 (0)