public class OkHttpClientInterceptor extends Object implements okhttp3.Interceptor, HttpClientInterceptor
| Constructor and Description |
|---|
OkHttpClientInterceptor(okhttp3.OkHttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
init(Function<MockHttpRequest,Optional<MockHttpResponse>> onBeforeRequest,
BiFunction<MockHttpRequest,MockHttpResponse,MockHttpResponse> onAfterRequest) |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
public OkHttpClientInterceptor(okhttp3.OkHttpClient httpClient)
public void init(Function<MockHttpRequest,Optional<MockHttpResponse>> onBeforeRequest, BiFunction<MockHttpRequest,MockHttpResponse,MockHttpResponse> onAfterRequest)
init in interface HttpClientInterceptorpublic okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.InterceptorIOExceptionCopyright © 2020. All rights reserved.