酒吧房小黑屋麦标显示,网络请求头添加版本信息。
This commit is contained in:
@@ -98,9 +98,7 @@ public class RetrofitClient {
|
||||
|
||||
private OkHttpClient provideOkHttpClient() {
|
||||
Map<String, String> headers = Collections.emptyMap();
|
||||
if (SpUtil.isAgreePolicy()) {
|
||||
headers = SystemUtils.getSystemParams();
|
||||
}
|
||||
headers = SystemUtils.getSystemParams();
|
||||
SetCookieCache cookieCache = new SetCookieCache();
|
||||
ClearableCookieJar cookieJar =
|
||||
new PersistentCookieJar(cookieCache, new SharedPrefsCookiePersistor(CommonAppContext.getInstance()));
|
||||
@@ -123,6 +121,10 @@ public class RetrofitClient {
|
||||
sslContext = SSLContext.getInstance("SSL");
|
||||
sslContext.init(null, new TrustManager[]{trustAllCert}, new SecureRandom());
|
||||
|
||||
headers.entrySet().stream()
|
||||
.forEach(entry -> LogUtils.e("Header: %-20s Value: %s", entry.getKey(), entry.getValue()));
|
||||
|
||||
|
||||
final OkHttpClient client = new OkHttpClient.Builder()
|
||||
.addInterceptor(new DataLoggingInterceptor(new DataLogger()))
|
||||
.addInterceptor(new AccessTokenInterceptor(headers))
|
||||
|
||||
Reference in New Issue
Block a user