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