@ -12,7 +12,8 @@ import java.nio.charset.Charset
class StrResponseParser(val encode: String? = null) : rxhttp.wrapper.parse.Parser<StrResponse> {
override fun onParse(response: Response): StrResponse {
return StrResponse.success(getString(response), response)
val body = getString(response)
return StrResponse.success(body, response)
}
private fun getString(response: Response): String {
@ -312,6 +312,7 @@ class AnalyzeUrl(
else -> RxHttp.get(url)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(fieldMap)
.addAllHeader(headerMap)
.toStrResponse().await()
@ -41,6 +41,7 @@ class ExploreShowViewModel(application: Application) : BaseViewModel(application
App.db.searchBookDao.insert(*searchBooks.toTypedArray())
page++
}.onError {
it.printStackTrace()
toast(it.msg)