I'm building an app that only consume a Web Service. For that, I use a method dataTask (URLSession.shared.dataTask).
I'm not waiting for information, only a process is triggered with the next code:
let endPoint = "http://host/service
let url = URL(string: endPoint)
let task = URLSession.shared.dataTask(with: url!) {_, _, _ in
}
task.resume()
When the method dataTask executes, Xcode show me the error:
"Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"
Is there a way to skip the return completionHandler (data, response, error)?