Axinom Mosaic Libraries
    Preparing search index...
    • Generates webhook request body and headers from the provided payload, secret, and messageType. Payload is wrapped in WebhookRequestMessage and the resulting object is stringified. This stringified message is used to generate an x-mosaic-signature header value and is returned as a string. Because the message is sent as a stringified JSON object for easier validation by the webhook, content-type application/json is added to the headers as well.

      Special cases for payload properties:

      • ArrayBuffer will be serialized as {}, transform it explicitly beforehand if needed.
      • BigInt will cause an error, must be stringified beforehand.
      • Date will be transformed into an ISO-8601 format, e.g. 2022-10-10T10:25:03.321492Z

      Type Parameters

      • TPayload

      Parameters

      Returns WebhookRequest