@@ -40,13 +40,13 @@ var privateKey = @"mryM-krWj_6IsIMGsd8wNFXGBxnx...............";
4040
4141var subscription = new PushSubscription (pushEndpoint , p256dh , auth );
4242var vapidDetails = new VapidDetails (subject , publicKey , privateKey );
43- // var gciApiKey = @"[your key here]";
43+ // var gcmApiKey = @"[your key here]";
4444
4545var webPushClient = new WebPushClient ();
4646try
4747{
4848 webPushClient .SendNotification (subscription , " payload" , vapidDetails );
49- // webPushClient.SendNotification(subscription, "payload", gciApiKey );
49+ // webPushClient.SendNotification(subscription, "payload", gcmApiKey );
5050 }
5151catch (WebPushException exception )
5252{
@@ -60,14 +60,15 @@ catch (WebPushException exception)
6060
6161``` csharp
6262var subscription = new PushSubscription (pushEndpoint , p256dh , auth );
63- var vapidDetails = new VapidDetails (subject , publicKey , privateKey );
64- // var gciApiKey = @"[your key here]";
63+
64+ var options = new Dictionary <string ,object >();
65+ options [" vapidDetails" ] = new VapidDetails (subject , publicKey , privateKey );
66+ // options["gcmAPIKey"] = @"[your key here]";
6567
6668var webPushClient = new WebPushClient ();
6769try
6870{
69- webPushClient .SendNotification (subscription , " payload" , vapidDetails );
70- // webPushClient.SendNotification(subscription, "payload", gciApiKey);
71+ webPushClient .SendNotification (subscription , " payload" , options );
7172}
7273catch (WebPushException exception )
7374{
@@ -102,7 +103,7 @@ any of the following values defined, although none of them are required.
102103
103104- ** gcmAPIKey** can be a GCM API key to be used for this request and this
104105request only. This overrides any API key set via ` setGCMAPIKey() ` .
105- - ** vapidDetails** should be an object with * subject* , * publicKey* and
106+ - ** vapidDetails** should be a VapidDetails object with * subject* , * publicKey* and
106107* privateKey* values defined. These values should follow the [ VAPID Spec] ( https://tools.ietf.org/html/draft-thomson-webpush-vapid ) .
107108- ** TTL** is a value in seconds that describes how long a push message is
108109retained by the push service (by default, four weeks).
0 commit comments