Update HttpHelper.kt

在HTTP请求头中Referrer写作Referer
pull/310/head
AndyBernie 4 years ago committed by GitHub
parent 489b213501
commit 9720126f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/help/http/HttpHelper.kt

@ -52,7 +52,7 @@ object HttpHelper {
fun getBytes(url: String, referrer: String): ByteArray? {
NetworkUtils.getBaseUrl(url)?.let { baseUrl ->
val headers =
mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referrer", referrer))
mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referer", referrer))
return getByteRetrofit(baseUrl)
.create(HttpGetApi::class.java)
.getMapByte(url, mapOf(), headers)
@ -132,4 +132,4 @@ object HttpHelper {
webView.load(params)
}
}
}

Loading…
Cancel
Save