PV
const
fetch = require('node-fetch'),
url = 'http://iot-main:8087/setBulk',
params = [
{
"id": '0_userdata.0.example_state',
"val": true
}
]
fetch(url, {method: 'POST', body: '0_userdata.0.example_state=true'})
.then(res => res.json())
.then(json => console.log(json));
в логеscript.js.Test.testsimpleAPI: [{'id':'0_userdata.0.example_state','val':true}]
