[Solved] How can i use alamofire for post api [duplicate]

First of all you add almofire library into your project then import almofire into your ViewController then below method apply in your button action. func webServiceLogin(isFbLogin:Bool,email:String,password:String) { var parameters:[String:String]? parameters = [“hash”:email as String,”key”:password ] Alamofire.request(“your url”, method: .post, parameters: parameters,encoding: URLEncoding.default, headers: nil).responseJSON { response in hideHud(self.view) switch response.result { case .success: if let … Read more