@@ -52,8 +52,8 @@ var vapidDetails = new VapidDetails(subject, publicKey, privateKey);
5252var webPushClient = new WebPushClient ();
5353try
5454{
55- webPushClient .SendNotification (subscription , " payload" , vapidDetails );
56- // webPushClient.SendNotification (subscription, "payload", gcmAPIKey);
55+ await webPushClient .SendNotificationAsync (subscription , " payload" , vapidDetails );
56+ // await webPushClient.SendNotificationAsync (subscription, "payload", gcmAPIKey);
5757 }
5858catch (WebPushException exception )
5959{
@@ -63,7 +63,7 @@ catch (WebPushException exception)
6363
6464# API Reference
6565
66- ## SendNotification (pushSubscription, payload, vapidDetails|gcmAPIKey|options)
66+ ## SendNotificationAsync (pushSubscription, payload, vapidDetails|gcmAPIKey|options, cancellationToken )
6767
6868``` csharp
6969var subscription = new PushSubscription (pushEndpoint , p256dh , auth );
@@ -75,15 +75,15 @@ options["vapidDetails"] = new VapidDetails(subject, publicKey, privateKey);
7575var webPushClient = new WebPushClient ();
7676try
7777{
78- webPushClient .SendNotification (subscription , " payload" , options );
78+ webPushClient .SendNotificationAsync (subscription , " payload" , options );
7979}
8080catch (WebPushException exception )
8181{
8282 Console .WriteLine (" Http STATUS code" + exception .StatusCode );
8383}
8484```
8585
86- > ** Note:** ` SendNotification ()` you don't need to define a payload, and this
86+ > ** Note:** ` SendNotificationAsync ()` you don't need to define a payload, and this
8787 method will work without a GCM API Key and / or VAPID keys if the push service
8888supports it.
8989
0 commit comments