Use firebase cloud function to send POST request to non-google server -
i wondering if possible use firebase cloud function send post request non-google server (from can find need on blaze plan in order interact non google servers)
basically want post external server running on arduino whenever value added database.
i have looked through docs , found examples of having cloud function respond http post request (http cloud functions) can't seem find examples of posting external server. possible?
yes, can. need use 'request' module, code this:
module call:
var request = require('request');
and code request:
request('put external url here', function (error, response, body) { if (!error && response.statuscode == 200) { //here put want request } })
edit: work on paid plans, it's not possible free plans.
Comments
Post a Comment