Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed May 23, 2022
1 parent 1e65b5b commit 603b9c9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion http-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A lightweight wrapper to the [JDK 11+ Java Http Client](http://openjdk.java.net/
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-client</artifactId>
<version>1.14</version>
<version>1.17</version>
</dependency>
```

Expand Down Expand Up @@ -83,6 +83,15 @@ HttpResponse<String> hres = clientContext.request()
.GET()
.asString();
```

#### Example GET as JSON marshalling into a java class/dto
```java
CustomerDto customer = clientContext.request()
.path("customers").path(42)
.GET()
.bean(CustomerDto.class);
```

#### Example Async GET as String
- All async requests use CompletableFuture&lt;T&gt;
- throwable is a CompletionException
Expand Down

0 comments on commit 603b9c9

Please sign in to comment.