Server.callWithPOST callback not triggered
-
I'm trying to use
Server.callWithPOST, but the callback is not triggered and no errors presented. What could be wrong? Is there a way I can debug it?local url = 'https://webhook.site/d3168142-e543-4136-ace6-f17a7f0381e5'; local payload = { "test": 123, }; Server.callWithPOST(url, JSON.stringify(payload), function(status, response) { Console.print(status); Console.print(response); }); -
@daniloprates Are you calling this from a button callback?
-
@d-healey it was missing
setBaseURLNot it worked:
Server.setBaseURL("https://webhook.site"); local url = '/d3168142-e543-4136-ace6-f17a7f0381e5'; local payload = { "test": 123, }; Server.callWithPOST(url, payload, function(status, response) { Utils.cl(status); Utils.cl(response); }); -
@daniloprates You want to set the base URL first:
Server.setBaseURL("https://webhook.site"); local url = '4df64496-5ed1-4c08-94fe-3f894537b369'; local payload = { "test": 123, }; Server.callWithPOST(url, payload, function(status, response) { Console.print(status); Console.print(response); }); -
@daniloprates It appears you found it already
