|
|
@ -297,12 +297,14 @@ class AnalyzeUrl( |
|
|
|
RequestMethod.POST -> { |
|
|
|
RequestMethod.POST -> { |
|
|
|
if (fieldMap.isNotEmpty()) { |
|
|
|
if (fieldMap.isNotEmpty()) { |
|
|
|
RxHttp.postForm(url) |
|
|
|
RxHttp.postForm(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.toStrResponse().await() |
|
|
|
.toStrResponse().await() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
RxHttp.postJson(url) |
|
|
|
RxHttp.postJson(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAll(body) |
|
|
|
.addAll(body) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
@ -310,6 +312,7 @@ class AnalyzeUrl( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else -> RxHttp.get(url) |
|
|
|
else -> RxHttp.get(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
@ -323,12 +326,14 @@ class AnalyzeUrl( |
|
|
|
RequestMethod.POST -> { |
|
|
|
RequestMethod.POST -> { |
|
|
|
if (fieldMap.isNotEmpty()) { |
|
|
|
if (fieldMap.isNotEmpty()) { |
|
|
|
RxHttp.postForm(url) |
|
|
|
RxHttp.postForm(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.toByteArray().await() |
|
|
|
.toByteArray().await() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
RxHttp.postJson(url) |
|
|
|
RxHttp.postJson(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAll(body) |
|
|
|
.addAll(body) |
|
|
|
.addAllHeader(headerMap) |
|
|
|
.addAllHeader(headerMap) |
|
|
@ -336,6 +341,7 @@ class AnalyzeUrl( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else -> RxHttp.get(url) |
|
|
|
else -> RxHttp.get(url) |
|
|
|
|
|
|
|
.setAssemblyEnabled(false) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.setOkClient(HttpHelper.getProxyClient(proxy)) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.addAllEncoded(fieldMap) |
|
|
|
.toByteArray().await() |
|
|
|
.toByteArray().await() |
|
|
|