Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StructuredHTTPReceiver

A utility class used to receive structured CloudEvents over HTTP.

see

{StructuredReceiver}

Hierarchy

  • StructuredHTTPReceiver

Index

Constructors

Methods

Constructors

constructor

Methods

check

  • check(payload: object, headers: object): boolean
  • Checks whether the provided payload and headers conform to the Cloud Events specification version supported by this instance.

    throws

    {ValidationError} if the payload and header combination do not conform to the spec

    Parameters

    • payload: object

      the cloud event data payload

    • headers: object

      the HTTP headers received for this cloud event

    Returns boolean

    true if the payload and header combination are valid

parse

  • parse(payload: object, headers: object): "/home/runner/work/sdk-javascript/sdk-javascript/src/lib/cloudevent"
  • Creates a new CloudEvent instance based on the provided payload and headers.

    throws

    {ValidationError} if the payload and header combination do not conform to the spec

    Parameters

    • payload: object

      the cloud event data payload

    • headers: object

      the HTTP headers received for this cloud event

    Returns "/home/runner/work/sdk-javascript/sdk-javascript/src/lib/cloudevent"

    a new CloudEvent instance for the provided headers and payload

Generated using TypeDoc