pull/540/head
gedoor 4 years ago
parent 307c80b478
commit 6dda59a6bc
  1. 4
      app/build.gradle
  2. 8
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -172,10 +172,10 @@ dependencies {
implementation 'com.github.gedoor:rhino-android:1.4' implementation 'com.github.gedoor:rhino-android:1.4'
// //
implementation 'com.ljx.rxhttp:rxhttp:2.4.4-beta2' implementation 'com.ljx.rxhttp:rxhttp:2.4.4-beta3'
implementation 'com.squareup.okhttp3:okhttp:4.9.0' implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1' implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
kapt 'com.ljx.rxhttp:rxhttp-compiler:2.4.4-beta2' kapt 'com.ljx.rxhttp:rxhttp-compiler:2.4.4-beta3'
//Glide //Glide
implementation 'com.github.bumptech.glide:glide:4.11.0' implementation 'com.github.bumptech.glide:glide:4.11.0'

@ -298,7 +298,7 @@ class AnalyzeUrl(
if (fieldMap.isNotEmpty()) { if (fieldMap.isNotEmpty()) {
RxHttp.postForm(url) RxHttp.postForm(url)
.setOkClient(HttpHelper.getProxyClient(proxy)) .setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(fieldMap) .addAllEncoded(fieldMap)
.addAllHeader(headerMap) .addAllHeader(headerMap)
.toStrResponse().await() .toStrResponse().await()
} else { } else {
@ -311,7 +311,7 @@ class AnalyzeUrl(
} }
else -> RxHttp.get(url) else -> RxHttp.get(url)
.setOkClient(HttpHelper.getProxyClient(proxy)) .setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(fieldMap) .addAllEncoded(fieldMap)
.addAllHeader(headerMap) .addAllHeader(headerMap)
.toStrResponse().await() .toStrResponse().await()
} }
@ -324,7 +324,7 @@ class AnalyzeUrl(
if (fieldMap.isNotEmpty()) { if (fieldMap.isNotEmpty()) {
RxHttp.postForm(url) RxHttp.postForm(url)
.setOkClient(HttpHelper.getProxyClient(proxy)) .setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(fieldMap) .addAllEncoded(fieldMap)
.addAllHeader(headerMap) .addAllHeader(headerMap)
.toByteArray().await() .toByteArray().await()
} else { } else {
@ -337,7 +337,7 @@ class AnalyzeUrl(
} }
else -> RxHttp.get(url) else -> RxHttp.get(url)
.setOkClient(HttpHelper.getProxyClient(proxy)) .setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(fieldMap) .addAllEncoded(fieldMap)
.toByteArray().await() .toByteArray().await()
} }
} }

Loading…
Cancel
Save