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

• 1 min read

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)
}