init(endpoint:userAgentKeyMaterial:vapidKeyID:)

Initialize a new subscriber manually.

Subscriber.swift:176
init(endpoint: URL, userAgentKeyMaterial: UserAgentKeyMaterial, vapidKeyID: VAPID.Key.ID)

Prefer decoding a subscription directly with the results of the subscription directly:

const subscriptionStatusResponse = await fetch(`/registerSubscription`, {
    method: "POST",
    body: {
        ...subscription.toJSON(),
        applicationServerKey: subscription.options.applicationServerKey,
    }
});