- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
48 lines
1.7 KiB
Java
48 lines
1.7 KiB
Java
package com.helpshift.network;
|
|
|
|
import com.helpshift.network.HSRequest;
|
|
import com.helpshift.network.exception.HSRootApiException;
|
|
import com.helpshift.network.exception.NetworkException;
|
|
import com.helpshift.util.Utils;
|
|
import com.ironsource.v8;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.net.URLEncoder;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class POSTNetwork extends HSBaseNetwork implements HSNetwork {
|
|
public POSTNetwork(HTTPTransport hTTPTransport, String str) {
|
|
super(hTTPTransport, str);
|
|
}
|
|
|
|
@Override // com.helpshift.network.HSBaseNetwork
|
|
public HSRequest getRequest(HSRequestData hSRequestData) {
|
|
return new HSRequest(HSRequest.Method.POST, getURL(), hSRequestData.headers, getBody(cleanData(hSRequestData.body)), 5000);
|
|
}
|
|
|
|
public final String getBody(Map map) {
|
|
ArrayList arrayList = new ArrayList();
|
|
for (Map.Entry entry : map.entrySet()) {
|
|
try {
|
|
arrayList.add(URLEncoder.encode((String) entry.getKey(), "UTF-8") + v8.i.b + URLEncoder.encode((String) entry.getValue(), "UTF-8"));
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw HSRootApiException.wrap(e, NetworkException.UNSUPPORTED_ENCODING_EXCEPTION);
|
|
}
|
|
}
|
|
return Utils.join(v8.i.c, arrayList);
|
|
}
|
|
|
|
public static Map cleanData(Map map) {
|
|
String str;
|
|
HashMap hashMap = new HashMap();
|
|
for (String str2 : map.keySet()) {
|
|
if (str2 != null && (str = (String) map.get(str2)) != null) {
|
|
hashMap.put(str2, str);
|
|
}
|
|
}
|
|
return hashMap;
|
|
}
|
|
}
|