jimu-decompiled/sources/okhttp3/internal/connection/ConnectInterceptor.java
2025-05-13 19:24:51 +02:00

26 lines
990 B
Java

package okhttp3.internal.connection;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.internal.http.RealInterceptorChain;
/* loaded from: classes2.dex */
public final class ConnectInterceptor implements Interceptor {
public final OkHttpClient client;
public ConnectInterceptor(OkHttpClient okHttpClient) {
this.client = okHttpClient;
}
@Override // okhttp3.Interceptor
public Response intercept(Interceptor.Chain chain) throws IOException {
RealInterceptorChain realInterceptorChain = (RealInterceptorChain) chain;
Request request = realInterceptorChain.request();
StreamAllocation streamAllocation = realInterceptorChain.streamAllocation();
return realInterceptorChain.proceed(request, streamAllocation, streamAllocation.newStream(this.client, chain, !request.method().equals("GET")), streamAllocation.connection());
}
}