chore(docs): Fix minor import problems in README (#374)

Signed-off-by: Ali Ok <aliok@redhat.com>
This commit is contained in:
Ali Ok 2021-01-04 19:02:53 +03:00 committed by GitHub
parent 97cf2f7785
commit ed8148326b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ for `headers` and `body`.
```js
const axios = require("axios").default;
const { HTTP } = require("cloudevents");
const { HTTP, CloudEvent } = require("cloudevents");
const ce = new CloudEvent({ type, source, data });
const message = HTTP.binary(ce); // Or HTTP.structured(ce)
@ -69,7 +69,7 @@ You may also use the `emitterFor()` function as a convenience.
```js
const axios = require("axios").default;
const { emitterFor, Mode } = require("cloudevents");
const { emitterFor, Mode, CloudEvent } = require("cloudevents");
function sendWithAxios(message) {
// Do what you need with the message headers