title: Alamofire - error code -999
body: <p>I wrote</p>
  
  <pre><code>class Property{
      ...
      static var alamofireManager: SessionManager{
          let sessionConfiguration = URLSessionConfiguration.default
          sessionConfiguration.timeoutIntervalForRequest = 10
          return Alamofire.SessionManager(configuration: sessionConfiguration)
      }
      ...
  }
  </code></pre>
  
  <p>for multiple classes' functions to use it.</p>
  
  <p>However, when I use it:</p>
  
  <pre><code>Property.alamofireManager.request(loginURL).validate(contentType: ["application/json"]).responseJSON{ response in
  ....
  </code></pre>
  
  <p>I get error saying : </p>
  
  <blockquote>
    <p>Task &lt;1F6C95AA-C878-439F-87ED-1055D19E3ADD>.&lt;1> finished with error - code: -999</p>
  </blockquote>
  
  <p>I know it works if I just use Alamofire. Does anyone know why this is not working?</p>
  
  <p>Thank you!</p>