Updated delegation system to account for custom headers
This commit is contained in:
parent
aff15b3ee2
commit
9efb1482f9
@ -91,7 +91,7 @@ abstract class HttpSource : CatalogueSource {
|
|||||||
/**
|
/**
|
||||||
* Headers used for requests.
|
* Headers used for requests.
|
||||||
*/
|
*/
|
||||||
val headers: Headers by lazy { headersBuilder().build() }
|
/* SY --> */ open /* SY <-- */ val headers: Headers by lazy { headersBuilder().build() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default network client for doing requests.
|
* Default network client for doing requests.
|
||||||
|
@ -99,6 +99,11 @@ abstract class DelegatedHttpSource(val delegate: HttpSource) : HttpSource() {
|
|||||||
*/
|
*/
|
||||||
override val baseUrl get() = delegate.baseUrl
|
override val baseUrl get() = delegate.baseUrl
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Headers used for requests.
|
||||||
|
*/
|
||||||
|
override val headers get() = delegate.headers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the source has support for latest updates.
|
* Whether the source has support for latest updates.
|
||||||
*/
|
*/
|
||||||
|
@ -103,6 +103,11 @@ class EnhancedHttpSource(
|
|||||||
*/
|
*/
|
||||||
override val baseUrl get() = source().baseUrl
|
override val baseUrl get() = source().baseUrl
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Headers used for requests.
|
||||||
|
*/
|
||||||
|
override val headers get() = source().headers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the source has support for latest updates.
|
* Whether the source has support for latest updates.
|
||||||
*/
|
*/
|
||||||
@ -128,7 +133,7 @@ class EnhancedHttpSource(
|
|||||||
/**
|
/**
|
||||||
* Default network client for doing requests.
|
* Default network client for doing requests.
|
||||||
*/
|
*/
|
||||||
override val client get() = source().client
|
override val client get() = originalSource.client // source().client
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visible name of the source.
|
* Visible name of the source.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user