About Extra argument in call error protection (alamofire?)

Asked 2 years ago, Updated 2 years ago, 70 views

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") 
}
}

swift alamofire

2022-09-30 21:37

1 Answers

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?


2022-09-30 21:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.