Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BinaryHTTPReceiver

A class that receives binary CloudEvents over HTTP. This class can be used if you know that all incoming events will be using binary transport. If events can come as either binary or structured, use {HTTPReceiver}.

Hierarchy

  • BinaryHTTPReceiver

Index

Constructors

Methods

Constructors

constructor

Methods

check

  • check(payload: Object, headers: Object): boolean
  • Checks an incoming HTTP request to determine if it conforms to the Cloud Event specification for this receiver.

    throws

    {ValidationError} if the event does not conform to the spec

    Parameters

    • payload: Object

      the HTTP request body

    • headers: Object

      the HTTP request headers

    Returns boolean

    true if the the provided payload and headers conform to the spec

parse

  • parse(payload: Object, headers: Object): "/home/runner/work/sdk-javascript/sdk-javascript/src/lib/cloudevent"
  • Parses an incoming HTTP request, converting it to a {CloudEvent} instance if it conforms to the Cloud Event specification for this receiver.

    throws

    {ValidationError} of the event does not conform to the spec

    Parameters

    • payload: Object

      the HTTP request body

    • headers: Object

      the HTTP request headers

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

    an instance of CloudEvent representing the incoming request

Generated using TypeDoc