Cannot convert value of type 'NSURL' to expected argument type 'NSURLRequest'
<p>For a POST request, I use this code:</p>

<pre><code>private func post(url: String, params: [String: AnyObject], headers: [String: AnyObject]) {

   let url = NSURL(string: apiUrl)!
   let session = NSURLSession.sharedSession()
   let request = NSMutableURLRequest(URL: url)
   request.HTTPMethod = "POST"
   request.setValue("application/json; charset=utf-8", forHTTPHeaderField:  "Content-Type")
   request.addValue("application/json", forHTTPHeaderField: "Application")

   do {
      request.HTTPBody = try NSJSONSerialization.dataWithJSONObject(params, options: NSJSONWritingOptions())
   } catch {            
      print("error")

      //POST with completionHandler
      var task = session.dataTaskWithRequest(url, completionHandler: { (data, response, error) -&gt; Void in        
        print(data)           
      })        
   }
}
</code></pre>

<p>and at the line that startst with <code>var task = ...</code> I get this error: <code>Cannot convert value of type 'NSURL' to expected argument type 'NSURLRequest'</code></p>