Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Maillard committed Jul 6, 2020
1 parent c796be6 commit 6dd7db8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebPush

A Web Push library for Java 7. Supports payloads and VAPID.
A Web Push library for Java 8. Supports payloads and VAPID.

[![Build Status](https://travis-ci.org/web-push-libs/webpush-java.svg?branch=master)](https://travis-ci.org/web-push-libs/webpush-java)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/nl.martijndwars/web-push/badge.svg)](https://search.maven.org/search?q=g:nl.martijndwars%20AND%20a:web-push)
Expand All @@ -19,7 +19,7 @@ For Maven, add the following dependency to `pom.xml`:
<dependency>
    <groupId>nl.martijndwars</groupId>
    <artifactId>web-push</artifactId>
    <version>5.1.1-SNAPSHOT</version>
    <version>${web-push.version}</version>
</dependency>
```

Expand Down Expand Up @@ -94,7 +94,7 @@ First, make sure you add the BouncyCastle security provider:
Security.addProvider(new BouncyCastleProvider());
```

Then, create an instance of the push service:
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:

```java
PushService pushService = new PushService(...);
Expand All @@ -112,12 +112,6 @@ To send a push notification:
pushService.send(notification);
```

Use `sendAsync` instead of `send` to get a `Future<HttpResponse>`:

```java
pushService.sendAsync(notification);
```

See [wiki/Usage-Example](https://github.com/web-push-libs/webpush-java/wiki/Usage-Example)
for detailed usage instructions. If you plan on using VAPID, read [wiki/VAPID](https://github.com/web-push-libs/webpush-java/wiki/VAPID).

Expand Down

0 comments on commit 6dd7db8

Please sign in to comment.