#spicyjungle_webhooks

1 messages ยท Page 1 of 1 (latest)

jade dragonBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237429304833474580

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tame tokenBOT
viral saffron
#

Worth adding "payload" is just await req.text();

weak temple
#

Hello

viral saffron
#

Hello

weak temple
#

Are you using Express here?

viral saffron
#

No, nextjs app router

#

Sorry, should've specified

weak temple
#

Gotcha, that router is probably manipulating the raw body

#

Can you log your req.text()?

viral saffron
#

Yes, 1 sec

weak temple
#

It should be binary (a buffer data type)

#

If you see JSON or a string or anything then you know that isn't the raw body

viral saffron
#

So just logging the payload?

weak temple
#

Yep

#

That will indicate whether you have the raw body or not

#

So seems like you want export const config = { api: { bodyParser: false, }, };

and

const buf = await buffer(req);

viral saffron
#

Yeah payload is JSON. Thanks, i'll try that out!

weak temple
#

๐Ÿ‘