-
Undocumented
Declaration
Swift
public let baseURLProvider: BaseURLProvider
-
Undocumented
Declaration
Swift
public let interceptors: [Interceptor]
-
Undocumented
Declaration
Swift
public let encoder: Encoder
-
Undocumented
Declaration
Swift
public let decoder: Decoder
-
Undocumented
Declaration
Swift
public let requestExecuterType: RequestExecuterType
-
Undocumented
Declaration
Swift
public let responseQueue: DispatchQueue
-
Undocumented
Declaration
Swift
public let cache: URLCache
-
Initialises a new configuration instance to use within the client.
Declaration
Swift
public init( baseURLProvider: BaseURLProvider, interceptors: [Interceptor], encoder: Encoder = JSONEncoder(), decoder: Decoder = JSONDecoder(), requestExecuterType: RequestExecuterType = .async, responseQueue: DispatchQueue = .main, cache: URLCache = .shared )
Parameters
baseURLProvider
The provider which provides the base URL used within the client. Note: URL itself is implementing the protocol itself to pass a static baseURL.
interceptors
A list of interceptors to intercept the request before sending (
RequestInterceptor
) it or intersect the response after receiving it (ResponseInterceptor
).encoder
The standard encoder to use to encode the request body data before sending it.
decoder
The standard decoder to use to decode the response body data before returning it.
requestExecuterType
The request executer type to use to execute the requests.
cache
A cache object that realizes caching mechanism. IMPORTANT: At least one instance of
SessionCacheInterceptor
is required.