File tree 2 files changed +8
-13
lines changed
2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,19 @@ import Foundation
39
39
```
40
40
*/
41
41
open class APIManager : APIManaging , Retryable {
42
+ // MARK: Public variables
43
+ /// Default JSONDecoder implementation
44
+ public var defaultDecoder : JSONDecoder {
45
+ JSONDecoder ( )
46
+ }
47
+
48
+ // MARK: Private variables
42
49
private let requestAdapters : [ RequestAdapting ]
43
50
private let responseProcessors : [ ResponseProcessing ]
44
51
private let errorProcessors : [ ErrorProcessing ]
45
52
private let responseProvider : ResponseProviding
46
53
private let sessionId : String
54
+
47
55
internal var retryCounter = Counter ( )
48
56
49
57
public init (
Original file line number Diff line number Diff line change @@ -39,11 +39,6 @@ public protocol APIManaging {
39
39
// MARK: - Provide request with default json decoder, retry configuration
40
40
41
41
public extension APIManaging {
42
- /// Default JSONDecoder implementation.
43
- var defaultDecoder : JSONDecoder {
44
- JSONDecoder . default
45
- }
46
-
47
42
/// Simplifies request using a default ``RetryConfiguration``.
48
43
/// - Parameter endpoint: API endpoint requestable definition.
49
44
/// - Returns: ``Response``.
@@ -88,11 +83,3 @@ public extension APIManaging {
88
83
return try decoder. decode ( DecodableResponse . self, from: response. data)
89
84
}
90
85
}
91
-
92
-
93
- // MARK: - JSONDecoder static extension
94
-
95
- private extension JSONDecoder {
96
- /// A static `JSONDecoder` instance used by default implementation of `APIManaging`
97
- static let `default` = JSONDecoder ( )
98
- }
You can’t perform that action at this time.
0 commit comments