use of org.wikipedia.dataclient.okhttp.CacheControlRequestInterceptor in project apps-android-wikipedia by wikimedia.
the class MockWebServerTest method setUp.
@Before
public void setUp() throws Throwable {
OkHttpClient.Builder builder = OkHttpConnectionFactory.getClient().newBuilder();
// Most tests do not expect cached responses.
// noinspection Since15
builder.interceptors().removeIf((interceptor) -> interceptor instanceof CacheControlRequestInterceptor);
okHttpClient = builder.dispatcher(new Dispatcher(new ImmediateExecutorService())).build();
server.setUp();
}
Aggregations