- WebClient webClient =
- WebClient
- .builder()
- .clientConnector(new JettyClientHttpConnector())
- .baseUrl(server.url("/").toString())
- .filter((request, next) -> next.exchange(request).flatMap(response ->
- {
- List<String> headerValues = response.headers().header("Foo");
- return headerValues.isEmpty() ? Mono.error(GraphApiException.create(response)) :
- Mono.just(response);
- }))
- .build();
-