Backendless Support
 
Provide More Info

Not Run Url requset

How Not Run Url requset in Handler??

/**

* @param {Object} req The request object contains information about the request

* @param {Object} req.context The execution context contains an information about application, current user and event

* @param {Object} req.args

*

* @returns {Object|Promise.<Object>|void} The event caller will receive this value

*/

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"} ;

return "event arguments: " + baseUrl ;

});

Leave a Comment

Comments (1)

photo
1

Hi,

I'm afraid I did not get the point. Could you please describe in details what needs to be done?

Anton