I'm searching about how to send some data to a website. For example, I want to send username and password to a website and I want to check if the login is successful or not. I searched a lot but I don't know how to do it.
If anyone has a background in HTTP request POST in Swift, I hope you can help me to send this data to a website using Swift 4.
import UIKit
import Alamofire
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let urlString = "https://www.instagram.com/accounts/login"
Alamofire.request(urlString, method: .get).authenticate(user: "username", password: "pwd").responseJSON
}
}
You have use with post method i am giving you example code like below
Please check my code i hope it will help you