Merge remote-tracking branch 'origin' into 7.0.x

This commit is contained in:
William Cheng
2023-03-03 21:52:50 +08:00
10595 changed files with 418520 additions and 73194 deletions

View File

@@ -70,8 +70,8 @@ val requestQueue: Lazy<RequestQueue> = lazy(initializer = {
The above constructor for each api allows the following to be customized
- A custom context, so either a singleton request queue or different scope can be created - see
https://developer.android.com/training/volley/requestqueue#singleton
- An overrideable request queue - which in turn can have a custom http url stack passed to it
- An overrideable request factory constructor call, or a request factory that can be overridden by a custom template, with
- An overridable request queue - which in turn can have a custom http url stack passed to it
- An overridable request factory constructor call, or a request factory that can be overridden by a custom template, with
custom header factory, request post processors and custom gson adapters injected.
#### Overriding request generation

View File

@@ -33,7 +33,7 @@ class RequestFactory(private val headerFactories : List<() -> Map<String, String
val allHeaders = headerFactories.fold(afterMarketHeaders) { acc, factory -> (acc + factory.invoke()).toMutableMap() }
// If we decide to support auth parameters in the url, then you will reference them by supplying a url string
// with known variable name refernces in the string. We will then apply
// with known variable name references in the string. We will then apply
val updatedUrl = if (!queryParams.isNullOrEmpty()) {
queryParams.asSequence().fold("$url?") {acc, param ->
"$acc${escapeString(param.key)}=${escapeString(param.value)}&"