added exchange and retrieve examples as in teh article, updated due to deprecation
This commit is contained in:
parent
10318d1145
commit
814369e38c
|
@ -72,8 +72,12 @@ public class WebClientController {
|
|||
.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() {
|
||||
|
|
Loading…
Reference in New Issue