Sending Requests
SuperTokensURLSession.dataTask
method: API Reference
Call the let url = URL(string: "http://api.example.com/api/getUserInfo")
var request = URLRequest(url: url!)
request.httpMethod = "POST"
SuperTokensURLSession.dataTask(request: request, completionHandler: {
data, response, error in
// DO SOMETHING
})
- Unlike with
URLSession
, you cannot suspend, resume and cancel tasks as of yet. In case this is required, please contact us