MNNetworkUtils
open class MNNetworkUtils
                Network Utils for v3.
- 
                  
                  
Places a synchronous GET method request with the specified parameter
Declaration
Swift
public static func requestGetSync(url: String) -> Data?Parameters
urlThe url of the server
Return Value
Raw data, if any is found.
 - 
                  
                  
Places a synchronous POST method request with the specified parameter
Declaration
Swift
public static func requestPostSyncWithStatus(url: String, parameters: [String : Any]) -> (Data?, Int?)Parameters
urlThe url of the server
parametersAn optional dicionary of key-value pairs
Return Value
Raw data, if any is found.
 - 
                  
                  
Declaration
Swift
public static func requestPostSync(url: String, parameters: [String : Any]) -> Data? - 
                  
                  
Places an asynchronous POST method request with the specified parameters
Declaration
Swift
public static func requestPostAsync(url: String, parameters: [String : Any], progress: ((Int) -> ())? = nil, response: ((Data?) -> ())? = nil)Parameters
urlThe url of the server
parametersAn optional dicionary of key-value pairs
progressA closure to process the progress of the data request operation
responseA completion hanlder to execute after the request finishes.
 - 
                  
                  
Declaration
Swift
public static func requestGetAsync(url: String, parameters: [String : Any]?, progress: ((Int) -> ())? = nil, response: ((Data?) -> ())? = nil) 
- 
                  
                  
Attempts to check the validity of a license by logging in to server
Declaration
Swift
public static func login(url: String, email: String, password: String) -> String?Parameters
urlThe url of the server
emailThe email associated with the license.
passwordThe password associated withh the email
 - 
                  
                  
Attempts to check the property based on login
Declaration
Swift
public static func loginForProperty(url: String, email: String, password: String) -> String?Parameters
urlThe url of the server
emailThe email associated with the license.
passwordThe password associated withh the email
 - 
                  
                  
Synchronusly retrieves a license with the specified parameters from server
Declaration
Swift
public static func getLicenceFromServerSync(url: String, licenceId: String, userName: String) -> String?Parameters
urlThe url of the server
licenseIdA string identifying the license
userNameThe username associated with the license
 - 
                  
                  
Validate licence api
Declaration
Swift
public static func licenceValidationSync(url: String, file: MNLicenceFile) -> String?Parameters
filecurrent licence file
Return Value
A server updated licence string. If validation failed, it will return nil.
 - 
                  
                  
Declaration
Swift
public static func checkForSuccess(statusCode: Int?) -> Bool - 
                  
                  
Declaration
Swift
public static func requestPostAsync<T:Decodable>(url: String, method: String = "POST", parameters: [String: Any], handler: ((T?, Error?, HTTPURLResponse?)->Void)?) - 
                  
                  
Declaration
Swift
public static func requestGetAsync(url: String, parameters: [String : Any], completed: ((Data?) -> ())? = nil) 
      MNNetworkUtils Class Reference