From 89016ddfbb4b2256f4cac5b578bf810425f88ec2 Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Wed, 29 Jul 2020 18:13:01 -0400 Subject: [PATCH] chore: Update readme with correct Receiver usage Signed-off-by: Lucas Holmquist --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e8fb4107..c128711f 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,8 @@ const { Receiver } = require("cloudevents"); -// Create a receiver to accept events over HTTP -const receiver = new Receiver(); - // body and headers come from an incoming HTTP request, e.g. express.js -const receivedEvent = receiver.accept(req.headers, req.body); +const receivedEvent = Receiver.accept(req.headers, req.body); console.log(receivedEvent); ``` @@ -157,4 +154,4 @@ We love contributions from the community! Please check the for information on how to get involved. [v1spec]: https://github.com/cloudevents/spec/tree/v1.0 -[v103pec]: https://github.com/cloudevents/spec/tree/v0.3 \ No newline at end of file +[v103pec]: https://github.com/cloudevents/spec/tree/v0.3