You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -19,7 +19,7 @@ For Maven, add the following dependency to `pom.xml`:
19
19
<dependency>
20
20
<groupId>nl.martijndwars</groupId>
21
21
<artifactId>web-push</artifactId>
22
-
<version>5.1.1-SNAPSHOT</version>
22
+
<version>${web-push.version}</version>
23
23
</dependency>
24
24
```
25
25
@@ -94,7 +94,7 @@ First, make sure you add the BouncyCastle security provider:
94
94
Security.addProvider(newBouncyCastleProvider());
95
95
```
96
96
97
-
Then, create an instance of the push service:
97
+
Then, create an instance of the push service, either `nl.martijndwars.webpush.PushService` for synchronous blocking HTTP calls, or `nl.martijndwars.webpush.PushAsyncService` for asynchronous non-blocking HTTP calls:
98
98
99
99
```java
100
100
PushService pushService =newPushService(...);
@@ -112,12 +112,6 @@ To send a push notification:
112
112
pushService.send(notification);
113
113
```
114
114
115
-
Use `sendAsync` instead of `send` to get a `Future<HttpResponse>`:
116
-
117
-
```java
118
-
pushService.sendAsync(notification);
119
-
```
120
-
121
115
See [wiki/Usage-Example](https://github.com/web-push-libs/webpush-java/wiki/Usage-Example)
122
116
for detailed usage instructions. If you plan on using VAPID, read [wiki/VAPID](https://github.com/web-push-libs/webpush-java/wiki/VAPID).
0 commit comments