-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] TypeError: Illegal invocation #9
Comments
Hey, thanks! Fixing now – sorry about that :) |
Your request should have the appropriate API.add('POST', '/webhook', async function (req, res) {
const body = await req.body()
console.log(body) //=> will be text string
}) |
Appreciate it! This is specifically for a Stripe Webhook, which signs the content as json, but will reject requests if you pull n a req.body() and pipe it through as JSON.stringify() (but will accept the raw
|
Just in case you missed it, |
Hey!
I'm running into:
When trying to use
req.body.text()
andreq.body.json()
in a cloudflare worker.I've wrapped the invocation in a try/catch and the error is empty.
With Worktop
Without Worktop
The text was updated successfully, but these errors were encountered: