Hello,
I've been using the flic buttons for some time to create an action in another app, but for some reason recently when I do the http.makeRequest the content sent is not received in the other app.
In the code example I call the scan function to find the buttons, and when it's 'completed' I send respective bdAddr to register the button in the other app, but for some reason that information doesn't reach the app...
Has there been any change in the way the information is passed on?! Or am I doing something wrong?! Can someone help me!
code example is below:
var buttonManager = require("buttons");
var http = require("http");
var url = "https://xxxxxx/registerButton";
var token = "Bearer yyyyy"
scan()
function scan(){
scanWizard = buttonManager.startScanWizard();
...
scanWizard.on("complete", function(bdAddr) {
var btn = buttonManager.getButton(bdAddr);
http.makeRequest({
url: url,
method: "POST",
headers: {"Content-Type": "application/json", "Authorization" : token},
content: JSON.stringify({ "id": bdAddr }),
}, function(err, res) {
});
});
}