RestClient
@objc
public class RestClient : NSObject
This class is responsible to handle REST API request, and acts as HTTP client for SDK Core
-
Singleton instance for
RestClient
Declaration
Swift
@objc public static let shared: RestClient
-
Invokes REST API Request with
Request
objectDeclaration
Swift
public func invoke(request: Request, action: Action? = nil, completion: @escaping ResultCallback)
-
Sets custom URLSessionConfiguration for RestClient’s URLSession object
Declaration
Swift
@objc public func setURLSessionConfiguration(config: URLSessionConfiguration)
Parameters
config
custom URLSessionConfiguration object
-
Sets custom URLSessionConfiguration and delegate Handler for RestClient’s URLSession object. This can be used to set SSL Pinning handling
Declaration
Swift
public func setURLSessionConfiguration(config: URLSessionConfiguration?, handler: FRURLSessionHandler?)
Parameters
config
custom URLSessionConfiguration object
handler
custom FRURLSessionHandler object