Creates a task that retrieves the contents of a URL based on the specified URL request object, and calls a handler upon completion.
Example usage:
URLSession.shared.request("https://www.example.com",
parameters: [
"name" : "Neo",
"surname" : "Anderson",
"city" : "Zion"
])?
.method(.GET) // Optional, default is .GET
.body(nil) // Optional, default body is nil
.callbackSchedule(to: DispatchQueue.main) //Executes callback on main thread
.error({ (error, response) in
})
.completion({ (data, response) in
})
.resume() // Required to start the task.