async function sampleHandler(context) {
    const name = context.request.body.name;
    (async () => {
        await new Promise(resolve => setTimeout(resolve, 1000));
        console.log(name)
    })();
    context.response.code = 200
}

// A sample context object
const sampleContext = {
    request: {
        body: {
            name: 'Alice'
        }
    },
    response: {}
}
sampleHandler(sampleContext)

// Mutating the context object by modifying the request body
sampleContext.request.body.name = 'Bob'
sampleHandler(sampleContext)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: