Why do I run Url request when I’m in debug mode ???
When not in debug mode,
the request Url is not executed.
//***************************************************************
Backendless.ServerCode.customEvent(‘foo’, function(req) {
//add your code here
console.log( "event arguments: " + req.args );
var baseUrl = 'https://api.telegram.org/bot545360173:AAEOnBGjICqhYG5AkeKih0TPsEEXT-QIxb8/sendMessage?chat_id=537301093&text=ali';
var request = require("request");
request(baseUrl, function(error, response, body) {
console.log(body);
});
// return {status:"Event Processed"} ;
Backendless.Request(request);
return "event arguments: " + baseUrl ;
});