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