node.js - HTTP GET request in Swift IOS -


this 1 killing me! long story short, running node.js server communicates mongo database. have been successful submitting data http post(and see results), life of me failing requests.

my code:

let url = nsurl(string: "http://*******/users/userlist") let requestget = nsmutableurlrequest(url: url!) var response: nsurlresponse?  requestget.httpmethod = "get" requestget.addvalue("application/json", forhttpheaderfield: "accept")  nsurlconnection.sendasynchronousrequest(requestget, queue: nsoperationqueue.mainqueue())  {(response, data, error) in  println(nsstring(data: data, encoding: nsutf8stringencoding)) } 

i able step through code above, reason when hit "nsurlconnection" xcode ignores 'println', somthing cannot explain.

i know i'm doing pretty stupid....


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -