title: Swift 4- http request Post to login in website
body: <p>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.</p>
  
  <p>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.  </p>
  
  <pre><code>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
      }
  }
  </code></pre>