抖映智能创作 v1.0.4版本的 MD5 值为:964d3a4f9a92da3d4edfc23c5180d390
以下内容为反编译后的 c.java 源代码,内容仅作参考
package wi;
import android.text.TextUtils;
import com.qiyukf.nimlib.f.e;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.Map;
import pf.h;
import uh.l;
public final class c {
public static boolean f24446a = false;
public class a implements h<String> {
public final String f24447a;
public final Map f24448b;
public final String f24449c;
public final h f24450d;
public a(String str, Map map, String str2, h hVar) {
this.f24447a = str;
this.f24448b = map;
this.f24449c = str2;
this.f24450d = hVar;
}
@Override
public final void a(int i10) {
this.f24450d.b(new com.qiyukf.unicorn.i.a.d(i10, "ip get is failed" + this.f24447a));
}
@Override
public final void b(Throwable th2) {
this.f24450d.b(new com.qiyukf.unicorn.i.a.d(404, "ip get is exception" + this.f24447a));
}
@Override
public final void onSuccess(String str) {
String str2 = str;
try {
ba.a.c("YSFHttpClient", "http request use ip= ".concat(String.valueOf(str2)));
this.f24450d.onSuccess(d.d(c.h(c.a(), this.f24447a, this.f24448b), str2, this.f24449c, "Common"));
} catch (IOException e10) {
this.f24450d.b(e10);
}
}
}
public static String a() {
if (l.C().unicornAddress != null && !TextUtils.isEmpty(l.C().unicornAddress.defaultUrl)) {
return l.C().unicornAddress.defaultUrl;
}
int f10 = e.f();
return f10 == 1 ? "http://aq1.qytest.netease.com" : f10 == 2 ? "http://qiyukf.netease.com" : f10 == 3 ? "http://qydev.netease.com" : "https://ap1.qiyukf.com";
}
public static String b(String str, String str2) throws com.qiyukf.unicorn.i.a.d {
try {
return d.c(h(str, str2, null), "GET", "Common");
} catch (IOException e10) {
throw new com.qiyukf.unicorn.i.a.d("get request error", e10);
}
}
public static String d(String str, Map<String, String> map) throws com.qiyukf.unicorn.i.a.d {
try {
return d.c(h(a(), str, map), "GET", "Common");
} catch (IOException e10) {
throw new com.qiyukf.unicorn.i.a.d("get request error", e10);
}
}
public static void e(String str, String str2, Map<String, String> map, h<String> hVar) {
f24446a = true;
a aVar = new a(str2, map, str, hVar);
wi.a.a();
wi.a.c(a(), aVar);
}
public static void f(String str, Map<String, String> map, h<String> hVar) {
if (f24446a) {
e("GET", str, map, hVar);
return;
}
try {
hVar.onSuccess(d.c(h(a(), str, map), "GET", "Common"));
} catch (IOException unused) {
e("GET", str, map, hVar);
} catch (Exception e10) {
hVar.b(e10);
}
}
public static String g() {
if (l.C().unicornAddress != null && !TextUtils.isEmpty(l.C().unicornAddress.daUrl)) {
return l.C().unicornAddress.daUrl;
}
int f10 = e.f();
return f10 == 1 ? "http://da.qytest.netease.com" : f10 == 2 ? "http://da.qiyukf.netease.com" : "https://da.qiyukf.com";
}
public static String h(String str, String str2, Map<String, String> map) {
String str3 = str + str2;
if (map != null) {
int i10 = 0;
for (Map.Entry<String, String> entry : map.entrySet()) {
if (!TextUtils.isEmpty(entry.getKey()) && !TextUtils.isEmpty(entry.getValue())) {
StringBuilder sb2 = new StringBuilder();
sb2.append(str3);
sb2.append(i10 == 0 ? "?" : com.alipay.sdk.sys.a.f7664b);
str3 = sb2.toString() + entry.getKey() + "=" + URLEncoder.encode(entry.getValue());
i10++;
}
}
}
ba.a.f("YSFHttpClient", "http request url= ".concat(String.valueOf(str3)));
return str3;
}
public static void i(String str, Map<String, String> map, h<String> hVar) {
if (f24446a) {
e("POST", str, map, hVar);
return;
}
try {
hVar.onSuccess(d.c(h(a(), str, map), "POST", "Common"));
} catch (IOException unused) {
e("POST", str, map, hVar);
} catch (Exception e10) {
hVar.b(e10);
}
}
}