title: Alamofire: finished with error - code: -1001
body: <p>Code like this:  </p>
  
  <pre><code>import Foundation
  import Alamofire
  struct Request {
  var alamoFireManager : SessionManager?
  init() {
      let configuration = URLSessionConfiguration.default
              configuration.timeoutIntervalForRequest = 20
      configuration.requestCachePolicy = .useProtocolCachePolicy
              alamoFireManager = Alamofire.SessionManager(configuration: configuration)
  }
  
  func sendRequest() {
  
      alamoFireManager?.request(url,method: method, parameters: body, encoding: JSONEncoding.default,headers: headers).responseJSON { response in
  
      }
  }
  }
  </code></pre>