I am basically wondering if I can have an https Google Cloud function execute differently based on what I pass to it as a parameter (like any normal function with parameters). Possibly with a simple query inside the URL or any other method that works.
As an example, taking a look at the basic starter function in any tutorial:
exports.helloWorld = functions.https.onRequest((req, res) => {
res.status(200).send('Hello, World!');
});
I would like to do something like:
exports.helloWorld = functions.https.onRequest((req, res) => {
let name = req.query;
res.status(200).send(`Hello, ${name}!`);
});
I hope this makes sense. Any help would be appreciated.