forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)}&"
|
||||
|
||||
Reference in New Issue
Block a user