forked from loafle/openapi-generator-original
[swift] Open buildHeaders() and requestBuilderFactory property to allow extension. (#5225)
This commit is contained in:
parent
1277db61bd
commit
f110072ef1
@ -10,7 +10,7 @@ open class {{projectName}}API {
|
|||||||
open static var basePath = "{{{basePath}}}"
|
open static var basePath = "{{{basePath}}}"
|
||||||
open static var credential: URLCredential?
|
open static var credential: URLCredential?
|
||||||
open static var customHeaders: [String:String] = [:]
|
open static var customHeaders: [String:String] = [:]
|
||||||
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||||
}
|
}
|
||||||
|
|
||||||
open class APIBase {
|
open class APIBase {
|
||||||
|
@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func buildHeaders() -> [String: String] {
|
open func buildHeaders() -> [String: String] {
|
||||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||||
for (key, value) in self.headers {
|
for (key, value) in self.headers {
|
||||||
httpHeaders[key] = value
|
httpHeaders[key] = value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user