From 1a81ff5cc27fc452c319d40f8d4b4f7391ec1447 Mon Sep 17 00:00:00 2001 From: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Date: Thu, 29 Sep 2022 05:36:16 +0800 Subject: [PATCH] Requests: add GET(HttpUrl) overload (#7) --- .../main/java/eu/kanade/tachiyomi/network/Requests.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/src/main/java/eu/kanade/tachiyomi/network/Requests.kt b/library/src/main/java/eu/kanade/tachiyomi/network/Requests.kt index 642540e..c70e499 100644 --- a/library/src/main/java/eu/kanade/tachiyomi/network/Requests.kt +++ b/library/src/main/java/eu/kanade/tachiyomi/network/Requests.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.network import okhttp3.CacheControl import okhttp3.Headers +import okhttp3.HttpUrl import okhttp3.Request import okhttp3.RequestBody @@ -16,6 +17,16 @@ fun GET(url: String, throw Exception("Stub!") } +/** + * @since extensions-lib 1.4 + */ +fun GET(url: HttpUrl, + headers: Headers = DEFAULT_HEADERS, + cache: CacheControl = DEFAULT_CACHE_CONTROL): Request { + + throw Exception("Stub!") +} + fun POST(url: String, headers: Headers = DEFAULT_HEADERS, body: RequestBody = DEFAULT_BODY,