BinaryHTTPEmitter

BinaryHTTPEmitter

A class to emit binary CloudEvents over HTTP.

Constructor

new BinaryHTTPEmitter(version)

Create a new {BinaryHTTPEmitter} for the provided CloudEvent specification version. Once an instance is created for a given spec version, it may only be used to send events for that version. Default version is 1.0

Parameters:
Name Type Description
version string

the CloudEvent HTTP specification version. Default: 1.0

Source:

Methods

(async) emit(options, cloudevent) → {Promise}

Sends this cloud event to a receiver over HTTP.

Parameters:
Name Type Description
options Object

The configuration options for this event. Options provided other than url will be passed along to Node.js http.request. https://nodejs.org/api/http.html#http_http_request_options_callback

Properties
Name Type Description
url URL

The HTTP/S url that should receive this event

cloudevent Object

the CloudEvent to be sent

Source: