-
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
baseURLProviderThe provider which provides the base URL used within the client. Note: URL itself is implementing the protocol itself to pass a static baseURL.
interceptorsA list of interceptors to intercept the request before sending (
RequestInterceptor) it or intersect the response after receiving it (ResponseInterceptor).encoderThe standard encoder to use to encode the request body data before sending it.
decoderThe standard decoder to use to decode the response body data before returning it.
requestExecuterTypeThe request executer type to use to execute the requests.
cacheA cache object that realizes caching mechanism. IMPORTANT: At least one instance of
SessionCacheInterceptoris required.
View on GitHub
Install in Dash
Configuration Structure Reference