Skip to content

How do I get the rawBody on Vercel Functions? #5213

Answered by leerob
hiroyukinuri asked this question in Help
Discussion options

You must be logged in to vote

Update 2024: This is now much easier with the Web API signature support.

export async function POST(request: Request) {
  const rawBody = await request.text()
  return Response.json({ rawBody })
}

Replies: 5 comments 11 replies

Comment options

You must be logged in to vote
8 replies
@hiroyukinuri
Comment options

@caenguidanos
Comment options

@hiroyukinuri
Comment options

@nikolaswise
Comment options

@alexandre-vl
Comment options

Comment options

You must be logged in to vote
1 reply
@caenguidanos
Comment options

Comment options

You must be logged in to vote
1 reply
@Djamilson
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dohomi
Comment options

Answer selected by leerob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
9 participants