Extra argument 'error' in call appears.It's been a few days since I touched the swift, so I don't know. Please help me.
import UIKit
import MapKit
import Alamofire
Class ViewController:
UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
@IBOutlet weak varmap1: MKMapView!
@IBOutletweak varpickerView:UIPickerView!
@ IBAction func nextButton(_sender:Any){
performSegue(withIdentifier: "recommend", sender:nil)
}
override func viewDidLoad(){
super.viewDidLoad()
}
override funcdidReceiveMemoryWarning(){
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
where the func getArticles() {//← error appears
Alamofire.request (.POST, "https://www.google.com")
}
}
According to Useage.md
in Alamofire
, the syntax of the request
method is
Alamofire.request ("https://www.google.com", method:.post)
Is it a compilation error that is causing the error?Or is it a runtime error after compiling?
© 2024 OneMinuteCode. All rights reserved.