正在查看: pg 娱乐 v1.0.7.202506242308 应用的 HttpClientJvmKt.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: pg 娱乐 v1.0.7.202506242308 应用的 HttpClientJvmKt.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package io.ktor.client;
import io.ktor.client.engine.HttpClientEngineFactory;
import java.util.List;
import java.util.ServiceLoader;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000*\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\u001a%\u0010\u0005\u001a\u00020\u00062\u001d\b\u0002\u0010\u0007\u001a\u0017\u0012\b\u0012\u0006\u0012\u0002\b\u00030\t\u0012\u0004\u0012\u00020\n0\b¢\u0006\u0002\b\u000b\"\u0012\u0010\u0000\u001a\u0006\u0012\u0002\b\u00030\u0001X\u0082\u0004¢\u0006\u0002\n\u0000\"\u0014\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"FACTORY", "Lio/ktor/client/engine/HttpClientEngineFactory;", "engines", "", "Lio/ktor/client/HttpClientEngineContainer;", "HttpClient", "Lio/ktor/client/HttpClient;", "block", "Lkotlin/Function1;", "Lio/ktor/client/HttpClientConfig;", "", "Lkotlin/ExtensionFunctionType;", "ktor-client-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
public final class HttpClientJvmKt {
private static final HttpClientEngineFactory<?> FACTORY;
private static final List<HttpClientEngineContainer> engines;
public static final HttpClient HttpClient(Function1<? super HttpClientConfig<?>, Unit> block) {
Intrinsics.checkNotNullParameter(block, "block");
return HttpClientKt.HttpClient(FACTORY, block);
}
public static HttpClient HttpClient$default(Function1 function1, int i, Object obj) {
if ((i & 1) != 0) {
function1 = new Function1<HttpClientConfig<?>, Unit>() {
public final void invoke2(HttpClientConfig<?> httpClientConfig) {
Intrinsics.checkNotNullParameter(httpClientConfig, "$this$null");
}
@Override
public Unit invoke(HttpClientConfig<?> httpClientConfig) {
invoke2(httpClientConfig);
return Unit.INSTANCE;
}
};
}
return HttpClient(function1);
}
static {
HttpClientEngineFactory<?> factory;
ServiceLoader load = ServiceLoader.load(HttpClientEngineContainer.class, HttpClientEngineContainer.class.getClassLoader());
Intrinsics.checkNotNullExpressionValue(load, "load(it, it.classLoader)");
List<HttpClientEngineContainer> list = CollectionsKt.toList(load);
engines = list;
HttpClientEngineContainer httpClientEngineContainer = (HttpClientEngineContainer) CollectionsKt.firstOrNull((List) list);
if (httpClientEngineContainer == null || (factory = httpClientEngineContainer.getFactory()) == null) {
throw new IllegalStateException("Failed to find HTTP client engine implementation in the classpath: consider adding client engine dependency. See https://ktor.io/docs/http-client-engines.html".toString());
}
FACTORY = factory;
}
}