Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HTTPEmitter

A class which is capable of sending binary and structured events using the CloudEvents HTTP Protocol Binding specification.

see

https://github.com/cloudevents/spec/blob/v1.0/http-protocol-binding.md

see

https://github.com/cloudevents/spec/blob/v1.0/http-protocol-binding.md#13-content-modes

Hierarchy

  • HTTPEmitter

Index

Constructors

Methods

Constructors

constructor

  • Creates a new instance of {HTTPEmitter}. The default emitter uses the 1.0 protocol specification in binary mode.

    throws

    {TypeError} if no options.url is provided or an unknown specification version is provided.

    Parameters

    • __namedParameters: {}

    Returns HTTPEmitter

Methods

send

  • send(event: CloudEvent, __namedParameters?: {}): any
  • Sends the {CloudEvent} to an event receiver over HTTP POST

    Parameters

    • event: CloudEvent

      the CloudEvent to be sent

    • Default value __namedParameters: {} = {}

    Returns any

    Promise with an eventual response from the receiver

Generated using TypeDoc