node-webpush 🔔
    Preparing search index...

    Class WebPush

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Generate the request (endpoint + fetch init) to send a push message.

      • For aes128gcm, this produces an RFC8188 payload body (header block + encrypted records).
      • For Web Push, defaults to a single record per RFC8291; multi-record requires allowMultipleRecords: true.

      Parameters

      Returns WebPushRequestDetails

    • Method to send notification to subscribed device

      Parameters

      • subscription: PushSubscription
      • Optionalpayload: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | null
      • Optionaloptions: GenerateRequestOptions & { throwOnInvalidResponse?: boolean }

      Returns Promise<Response>