Backendless Support
 
Waiting for user's response

request Url is not executed ...

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 ;

});

Leave a Comment

Comments (1)

photo
1

1) The same code is executed in debug mode but not working when deployed to production?

If so please create a minimal verifiable sample so we could reproduce the behavior you described and send it to support@backendless.com with steps to reproduce. It will fasten the investigation process.

2) How do you validate whether the Url is called or not?