Merge branch 'dev' into 'dev'
Proposal to resolve error where postData was being sent on a GET request. See merge request Shinobi-Systems/Shinobi!449cycling-live-grid
commit
b2b6d4b3f8
|
@ -47,11 +47,21 @@ module.exports = function(s,config,lang){
|
|||
ok: true,
|
||||
type: lang[doStart ? 'Control Triggered' : 'Control Trigger Ended']
|
||||
}
|
||||
const theRequest = fetchWithAuthentication(requestUrl,{
|
||||
method: controlUrlMethod || controlOptions.method,
|
||||
digestAuth: hasDigestAuthEnabled,
|
||||
postData: controlOptions.postData || null
|
||||
});
|
||||
var fetchWithAuthData;
|
||||
if (controlOptions.postData){
|
||||
fetchWithAuthData = {
|
||||
method: controlUrlMethod || controlOptions.method,
|
||||
digestAuth: hasDigestAuthEnabled,
|
||||
postData: controlOptions.postData
|
||||
}
|
||||
}
|
||||
else{
|
||||
fetchWithAuthData = {
|
||||
method: controlUrlMethod || controlOptions.method,
|
||||
digestAuth: hasDigestAuthEnabled
|
||||
}
|
||||
}
|
||||
const theRequest = fetchWithAuthentication(requestUrl,fetchWithAuthData);
|
||||
theRequest.then(res => res.text())
|
||||
.then((data) => {
|
||||
if(doStart){
|
||||
|
|
Loading…
Reference in New Issue