import Foundation import Alamofire class APIClient { internal typealias CompletionBlock = ( _ data: NSDictionary ?, _ error: NSError ?) -> Void // MARK: - Main Common Methos fileprivate class func executePostAPICallWithMethod(method: String ,withParameters parameters: AnyObject ?, callback: @escaping CompletionBlock ) { let str = ApiConstants . kBaseURL + method Alamofire. request (str, method: . post , parameters: parameters as ? [ String : AnyObject ]). responseJSON { response in switch response. result { case . success ( let JSON): let response = JSON as ! NSDictionary print (response) callback(response, nil ) break case . failure ( let error): print ( "Request failed with error: \ ( error )&qu