proxygoogle

node v14.20.1
version: 1.0.0
endpointsharetweet
const moment = require("moment"); const got = require("got"); async function fetch() { const res = await got('https://google.com'); const headers = JSON.stringify(res.body); return headers; } exports.endpoint = async function(request, response) { response.setHeader("Content-Type", "text/plain"); response.end(await fetch()); // response.end(res.body); } // fetch() // .then((res) => console.log('fetch', res)) // .catch(console.error);
Loading…

no comments

    sign in to comment