[swift] Open buildHeaders() and requestBuilderFactory property to allow extension. (#5225)

This commit is contained in:
Tomek Cejner 2017-04-23 17:02:21 +02:00 committed by wing328
parent 1277db61bd
commit f110072ef1
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ open class {{projectName}}API {
open static var basePath = "{{{basePath}}}"
open static var credential: URLCredential?
open static var customHeaders: [String:String] = [:]
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
}
open class APIBase {

View File

@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
}
}
private func buildHeaders() -> [String: String] {
open func buildHeaders() -> [String: String] {
var httpHeaders = SessionManager.defaultHTTPHeaders
for (key, value) in self.headers {
httpHeaders[key] = value