Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let session = URLSession.shared
- session.dataTask(with: url) { (data, response, error) in
- if let response = response {
- print(response)
- }
- if let data = data {
- print(data)
- do {
- let json = try JSONSerialization.jsonObject(with: data, options: [])
- print(json)
- } catch {
- print(error)
- }
- }
- }.resume()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement