Firebase 函数错误 - 错误:无法处理请求

拉格什
const functions = require('firebase-functions');
const request = require('request');

exports.sendtest = functions.https.onRequest((requests, responses) => {
var id = 'test';
var num = 'test';

url='https://myurl.com/test.php?id='+id+'&num='+num;

request({
          url: url,
          method: 'get',
      }, function (error, response, body) {
          if (error) throw error;
          response.redirect(body);
      });

});

当我部署和运行代码时,我收到类似的错误

错误:无法处理请求

我不知道为什么我会收到这样的错误。

拉格什

这是因为计划是免费的。所以它不允许连接到谷歌服务器之外。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章