From d6467724741b6f19d81908b39534cb3635d5f923 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Sat, 27 May 2023 14:36:20 -0700 Subject: [PATCH] Update webhooks doc to use the correct express.raw syntax --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7273faa..dbb98050 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ const receiver = new WebhookReceiver('apikey', 'apisecret'); // In order to use the validator, WebhookReceiver must have access to the raw POSTed string (instead of a parsed JSON object) // if you are using express middleware, ensure that `express.raw` is used for the webhook endpoint -// router.use('/webhook/path', express.raw()); +// app.use(express.raw({type: 'application/webhook+json'})); app.post('/webhook-endpoint', (req, res) => { // event is a WebhookEvent object