我正在为Firebase实现云功能,当触发时发出GET请求并且我希望它返回正文,但它不会返回任何内容。
"use strict";
var functions = require('firebase-functions');
var request = require('request');
var rp = require('request-promise');
exports.date = functions.https.onRequest((req, res) => {
var url = 'https://api.pipl.com/search/?url=https://www.linkedin.com/in/akberaliengineer/&key=BUSINESS-PREMIUM-DEMO-vg6sygfm5wgnvpznkl8btq7c'
return request(url, function (error, response, body) {
res.send(body);
});
});
谁能告诉我我做错了什么?