I have a code to send data to a web service that supposedly sends the token, but apparently it is wrong because the token does not reach the server, I hope you can help me. my code is this:
let token = "eyJ0enssnsuwew"
let url = URL(string: "http://webservice")
var request = NSMutableURLRequest(url: url!)
request.httpMethod = "POST"
request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")