feat: 优化代码

pull/105/head
kunfei 5 years ago
parent cbc30ce17d
commit e538084905
  1. 9
      app/src/main/java/io/legado/app/help/http/api/HttpGetApi.kt
  2. 2
      app/src/main/java/io/legado/app/help/http/api/HttpPostApi.kt

@ -11,7 +11,7 @@ import retrofit2.http.Url
* Created by GKF on 2018/1/21.
* get web content
*/
@Suppress("unused")
interface HttpGetApi {
@GET
suspend fun getAsync(
@ -38,4 +38,11 @@ interface HttpGetApi {
@QueryMap(encoded = true) queryMap: Map<String, String>,
@HeaderMap headers: Map<String, String>
): Call<String>
@GET
suspend fun getMapByteAsync(
@Url url: String,
@QueryMap(encoded = true) queryMap: Map<String, String>,
@HeaderMap headers: Map<String, String>
): Response<ByteArray>
}

@ -9,7 +9,7 @@ import retrofit2.http.*
* Created by GKF on 2018/1/29.
* post
*/
@Suppress("unused")
interface HttpPostApi {
@FormUrlEncoded

Loading…
Cancel
Save