Skip to content

Commit

Permalink
added exchange and retrieve examples as in teh article, updated due t…
Browse files Browse the repository at this point in the history
…o deprecation
  • Loading branch information
rozagerardo committed Jan 22, 2021
1 parent 2e84f6e commit fb46a4d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ public void demonstrateWebClient() {
.ifNoneMatch("*")
.ifModifiedSince(ZonedDateTime.now())
.retrieve();
WebClient.ResponseSpec response2 = requestSpec2.retrieve();

String response2 = uri1.exchangeToMono(response -> response.bodyToMono(String.class))
.block();
String response3 = uri2.retrieve()
.bodyToMono(String.class)
.block();
WebClient.ResponseSpec response4 = requestSpec2.retrieve();
}

private WebClient createWebClient() {
Expand Down

0 comments on commit fb46a4d

Please sign in to comment.