title: I want to consume login API (nodejs) using alamofire on swift
body: <p>there is my code </p>
  
  <pre><code>@IBAction func btn_login(_ sender: Any) {
  
  
  //        let serverUrl = "http://192.168.1.34:1337/login"
          let serverUrl = "http://10.0.0.10:1337/login"
  
          guard let email = emailtf.text, !email.isEmpty else {return}
          guard let password = passwordtf.text, !password.isEmpty else {return}
  
  
        let loginRequest = [
                     "email" : email,
                     "password" : password
                 ]
          Alamofire.request(serverUrl, method: .post, parameters: loginRequest, encoding: JSONEncoding.default, headers: nil).validate().responseJSON { (responseObject) -&gt; Void in
              print(responseObject)
              if responseObject.result.isSuccess {
                  let resJson = JSON(responseObject.result.value!)
                  print(resJson)
              }
              if responseObject.result.isFailure {
                  let error : Error = responseObject.result.error!
                  print(error)
              }
          }
      }
  </code></pre>
  
  <p>and im getting this error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."</p>
  
  <pre><code>&lt;4548B0C2-A5AD-4F23-8A9D-6A02F84FE3A9&gt;.&lt;1&gt; finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x6000009e6b20 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;4548B0C2-A5AD-4F23-8A9D-6A02F84FE3A9&gt;.&lt;1&gt;, _NSURLErrorRelatedURLSessionTaskErrorKey=(
      "LocalDataTask &lt;4548B0C2-A5AD-4F23-8A9D-6A02F84FE3A9&gt;.&lt;1&gt;"
  ), NSLocalizedDescription=The request timed out.
  </code></pre>
  
  <p>Any help please?</p>