Merge pull request #310 from AndyBernie/patch-1

Update HttpHelper.kt
pull/312/head
kunfei 4 years ago committed by GitHub
commit 83d0d29104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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)

Loading…
Cancel
Save