更新referrer拼错

pull/306/head
gedoor 4 years ago
parent 52c87069e6
commit 5810596e41
  1. 5
      app/src/main/java/io/legado/app/help/http/HttpHelper.kt

@ -49,9 +49,10 @@ object HttpHelper {
return null return null
} }
fun getBytes(url: String, refer: String): ByteArray? { fun getBytes(url: String, referrer: String): ByteArray? {
NetworkUtils.getBaseUrl(url)?.let { baseUrl -> NetworkUtils.getBaseUrl(url)?.let { baseUrl ->
val headers = mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("refer", refer)) val headers =
mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referrer", referrer))
return getByteRetrofit(baseUrl) return getByteRetrofit(baseUrl)
.create(HttpGetApi::class.java) .create(HttpGetApi::class.java)
.getMapByte(url, mapOf(), headers) .getMapByte(url, mapOf(), headers)

Loading…
Cancel
Save