Open PokeyOats opened 4 years ago
My apologies, I made a mistake.
- post:
url: "/jsontest"
body: "{{ jsontest1 }}"
I've even gone as far as reading the json from a file into a var and then sent that but it does not work
- function: "GetSomeData"
- post:
url: "/jsontest"
body: "{{ funcdata }}"
module.exports = {
GetSomeData: GetSomeData,
}
function GetSomeData(context, ee, next)
{
var fs = require('fs');
fs.readFile('test.txt', 'utf8', function(err, data)
{
if (err) throw err;
context.vars.funcdata = data;
});
return next();
}
funcdata: { "alerts": [ { "labels": { "alertname": "Watchdog" } } ] }
artvar: { "alerts": [ { "labels": { "alertname": "Watchdog" } } ] }
Good Day all,
I think I have found a bug in a situation using a variable with JSON.
Whilst the following works:
The following doesn't.