http - How to make CONNECT call in iOS? -
nsurlsession supports post , get; support connect?
if so, exact syntax?
thanks!
use nsmutableurlrequest
set whatever http method want
let session = nsurlsession() guard let url = nsurl(string: "http://www.google.com") else { fatalerror("error creating nsurl http://www.google.com") } let request = nsmutableurlrequest(url: url) request.httpmethod = "connect" let task = session.datataskwithrequest(request) task.resume()
Comments
Post a Comment