Merge pull request #150 from TouchInstinct/fix/status_codes
Fix/status codes
This commit is contained in:
commit
37b4c72374
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
### 0.8.2
|
||||
|
||||
- **Add**: `acceptableStatusCodes` property to `NetworkServiceConfiguration`
|
||||
|
||||
### 0.8.1
|
||||
|
||||
- **Add**: Support for `localizedComponent` for `FixedWidthInteger`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKit"
|
||||
s.version = "0.8.1"
|
||||
s.version = "0.8.2"
|
||||
s.summary = "iOS framework with a bunch of tools for rapid development"
|
||||
s.homepage = "https://github.com/TouchInstinct/LeadKit"
|
||||
s.license = "Apache License, Version 2.0"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ public struct NetworkServiceConfiguration {
|
|||
/// Server trust policies.
|
||||
public var serverTrustPolicies: [String: ServerTrustPolicy]
|
||||
|
||||
/// HTTP response status codes regarded as non-erroneous
|
||||
public var acceptableStatusCodes: Set<Int> = Set(200..<300)
|
||||
|
||||
/// Session configuration for potential fine tuning
|
||||
public var sessionConfiguration: URLSessionConfiguration
|
||||
|
||||
|
|
@ -67,7 +70,7 @@ public extension NetworkServiceConfiguration {
|
|||
var sessionManager: SessionManager {
|
||||
return SessionManager(configuration: sessionConfiguration,
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies),
|
||||
acceptableStatusCodes: Set(200..<300),
|
||||
acceptableStatusCodes: acceptableStatusCodes,
|
||||
mappingQueue: .global())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue