PhotoRoom v4.8.2版本的 MD5 值为:c40a01bb3380c0f75c0cb6ac6760f295
以下内容为反编译后的 NetworkRequestBuilder.java 源代码,内容仅作参考
package com.shakebugs.shake.network;
import android.webkit.URLUtil;
import androidx.annotation.Keep;
import com.shakebugs.shake.internal.domain.models.NetworkRequest;
import com.shakebugs.shake.internal.utils.e;
import java.util.Date;
import java.util.Map;
import java.util.TimeZone;
@Keep
public class NetworkRequestBuilder {
private static final String INVALID_URL_STRING = "https://not_a_valid_url";
private float duration;
private String requestBody;
private Map<String, String> requestHeaders;
private String responseBody;
private Map<String, String> responseHeaders;
private String timestamp;
private String url;
private String method = "";
private String statusCode = "";
private void validateURL() {
String str = this.url;
if (str == null) {
this.url = INVALID_URL_STRING;
} else if (URLUtil.isNetworkUrl(str)) {
} else {
this.url = INVALID_URL_STRING;
}
}
public NetworkRequest build() {
String str = this.method;
if (str == null) {
str = "";
}
this.method = str;
String str2 = this.statusCode;
this.statusCode = str2 != null ? str2 : "";
validateURL();
return new NetworkRequest(this.method, this.statusCode, this.url, this.requestBody, this.requestHeaders, this.responseBody, this.responseHeaders, this.duration, this.timestamp);
}
public NetworkRequestBuilder setDuration(float f11) {
this.duration = f11;
return this;
}
public NetworkRequestBuilder setMethod(String str) {
this.method = str;
return this;
}
public NetworkRequestBuilder setRequestBody(String str) {
this.requestBody = str;
return this;
}
public NetworkRequestBuilder setRequestHeaders(Map<String, String> map) {
this.requestHeaders = map;
return this;
}
public NetworkRequestBuilder setResponseBody(String str) {
this.responseBody = str;
return this;
}
public NetworkRequestBuilder setResponseHeaders(Map<String, String> map) {
this.responseHeaders = map;
return this;
}
public NetworkRequestBuilder setStatusCode(String str) {
this.statusCode = str;
return this;
}
public NetworkRequestBuilder setTimestamp(Date date) {
this.timestamp = e.a(date.getTime(), TimeZone.getTimeZone("UTC"));
return this;
}
public NetworkRequestBuilder setUrl(String str) {
this.url = str;
return this;
}
}