CircleCI

OkHttpClient integration with Spring Cloud

This module supplies integration with Square's OkHttpClient and Netflix Ribbon via Spring Cloud Netflix and Spring Cloud Loadbalancer.

An application interceptor is added to the OkHttpClient created via autoconfiguration which resolves the scheme, host and port from Ribbon or Spring Cloud Loadbalancer and rewrites the url.

By supporting OkHttpClient, it enables Square's Retrofit to use Ribbon and Spring Cloud Loadbalancer as well.

See OkHttpRibbonInterceptorTests for Ribbon samples.

Spring WebClient

Support was also added for Spring WebClient. This implements an okhttp3.Call.Factory that uses WebClient under the covers. This provides a fully non-blocking shim instead of using okhttp3.

See WebClientCallFactoryTests for WebClient samples.