Parameter Usages
FaasPlus makes it easy to use query string values as parameters, allowing for dynamic responses based on user input
Example 1: Say Hello
In this example, we’ll greet you by the first name and last name provided in the query string parameter.
const handleRequest = async (req) => {
const firstName = req.params.firstName || 'John';
const lastName = req.params.lastName || 'Doe';
return {
'Hello': firstName + ' ' + lastName
};
};
Response
{
"Hello": "Alan Turing"
}
You can also check filtering section to use parameter in filtering