How to read the body payload from a POST request in Netlify Edge function

Posted on October 20, 2022

Here the function example as per the title:

export default async (request, context) => {
    
    // you might want to check the method with `request.method === 'POST'`
  
    const body = await request.json()

    return new Response(body)
}