We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 649ceda + 944311a commit 147407eCopy full SHA for 147407e
Sources/Contentful/Client.swift
@@ -121,10 +121,13 @@ open class Client {
121
}
122
123
self.persistenceIntegration = persistenceIntegration
124
- let contentfulHTTPHeaders = [
+ var contentfulHTTPHeaders: [AnyHashable: Any] = [
125
"Authorization": "Bearer \(accessToken)",
126
"X-Contentful-User-Agent": clientConfiguration.userAgentString(with: persistenceIntegration)
127
]
128
+ if let additionalHeaders = sessionConfiguration.httpAdditionalHeaders {
129
+ contentfulHTTPHeaders.merge(additionalHeaders) { (currentPair, _) in currentPair }
130
+ }
131
sessionConfiguration.httpAdditionalHeaders = contentfulHTTPHeaders
132
self.urlSession = URLSession(configuration: sessionConfiguration)
133
0 commit comments