Skip to content

Commit e219a30

Browse files
authored
chore: Update readme with correct Receiver usage (cloudevents#287)
Signed-off-by: Lucas Holmquist <[email protected]>
1 parent 07e0bef commit e219a30

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ const {
3939
Receiver
4040
} = require("cloudevents");
4141

42-
// Create a receiver to accept events over HTTP
43-
const receiver = new Receiver();
44-
4542
// body and headers come from an incoming HTTP request, e.g. express.js
46-
const receivedEvent = receiver.accept(req.headers, req.body);
43+
const receivedEvent = Receiver.accept(req.headers, req.body);
4744
console.log(receivedEvent);
4845
```
4946

@@ -157,4 +154,4 @@ We love contributions from the community! Please check the
157154
for information on how to get involved.
158155

159156
[v1spec]: https://github.com/cloudevents/spec/tree/v1.0
160-
[v103pec]: https://github.com/cloudevents/spec/tree/v0.3
157+
[v103pec]: https://github.com/cloudevents/spec/tree/v0.3

0 commit comments

Comments
 (0)