0
seesion.dataTask(with:request) { (data,res,err) in
     print("Hello")
}

Ambiguous reference to member 'dataTask(with:completionHandler:)

Snai_JJ
  • 3
  • 2
  • I think I write right. – Snai_JJ Nov 23 '16 at 08:47
  • 1
    Have you seen [this](http://stackoverflow.com/questions/37812286/swift-3-urlsession-shared-ambiguous-reference-to-member-datataskwithcomplet) and [this](http://stackoverflow.com/questions/38718180/ambiguous-reference-to-member-datataskwithcompletionhandler) question? Does any of them help you? – FelixSFD Nov 23 '16 at 08:49
  • session.dataTask(with:request as URLRequest) { (data,res,err) in print("Hello") } – Snai_JJ Nov 23 '16 at 09:00
  • Don't use `NS(Mutable)URLRequest` in Swift 3 at all. Use native `URLRequest` – vadian Nov 23 '16 at 09:01
  • ok,thanks for your caution – Snai_JJ Nov 23 '16 at 09:04

1 Answers1

0

You use this code

 session.dataTask(with:request as URLRequest) { (data,res,err) in
            print("Hello")
        }
Yogendra Girase
  • 631
  • 3
  • 15