sdk-javascript/lib/bindings/http
Lance Ball 54f242b79e
feat: expose a mode and version agnostic event receiver (#120)
Event receivers in the wild may not always know what version or mode an
incoming event is. Instead of requiring developers to inspect the headers
themselves, the SDK should provide an HTTP receiver that is capable of
figuring out what the version and mode (structured/binary) of an incoming
event is and handle it appropriately.

In determining the best way to expose this, I chose to modify the API a
little bit. Now, instead of `const CloudEvent = require('cloudevents-sdk');`
users need to destructure it.

```js
const { HTTPReceiver, CloudEvent } = require('cloudevents-sdk');
```

This change should not be backported to 1.x.

Fixes: https://github.com/cloudevents/sdk-javascript/issues/93

Signed-off-by: Lance Ball <lball@redhat.com>
2020-05-06 13:25:16 -04:00
..
commons.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
constants.js fix: protects the consts from being changed in other parts of the code. 2020-04-30 12:19:24 -03:00
emitter_binary.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
emitter_binary_0_3.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
emitter_binary_1.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
emitter_structured.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
http_receiver.js feat: expose a mode and version agnostic event receiver (#120) 2020-05-06 13:25:16 -04:00
receiver_binary.js fix: make application/json the default content type in binary mode (#118) 2020-05-05 18:02:39 -04:00
receiver_binary_0_3.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
receiver_binary_1.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
receiver_structured.js feat: use CloudEvents not cloudevents everywhere (#101) 2020-04-30 16:14:13 -07:00
receiver_structured_0_3.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
receiver_structured_1.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00
unmarshaller.js chore: es6 unmarshaller (#108) 2020-05-05 13:02:43 -07:00
unmarshaller_0_3.js src: add eslint configuration and npm script 2020-04-22 10:15:05 -04:00