From 9c6745910508b4ab4cb6a136889bbead25d1cd2b Mon Sep 17 00:00:00 2001 From: ag2s20150909 Date: Sun, 5 Sep 2021 14:41:49 +0800 Subject: [PATCH] =?UTF-8?q?OkhttpCacheDataSource=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/help/OkhttpCacheDataSource.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java b/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java index d81dd3eae..5e8d5036d 100644 --- a/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java +++ b/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java @@ -170,6 +170,13 @@ public final class OkhttpCacheDataSource implements DataSource { return this; } + public Factory setDefaultRequestProperties(Map defaultRequestProperties){ + if (this.upstreamDataSourceFactory != null) { + this.upstreamDataSourceFactory.setDefaultRequestProperties(defaultRequestProperties); + } + return this; + } + /** * Sets an optional {@link PriorityTaskManager} to use when requesting data from upstream. *