Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

ios network request

let url = URL(string: "http://www.stackoverflow.com")!

let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
    guard let data = data else { return }
    print(String(data: data, encoding: .utf8)!)
}

task.resume()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ios #network #request
ADD COMMENT
Topic
Name
9+2 =