Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import Cocoa
let session = URLSession(configuration: URLSessionConfiguration.default)
var getTask = URLSessionTask()
var request = URLRequest(url: URL(string: "https://itunes.apple.com/search?term=jack+johnson&limit=25")!)
request.httpMethod = "GET"
getTask = session.dataTask(with: request, completionHandler: { (data, response, error) in
debugPrint("(data \(data != nil), response \(response), error \(response)")
})
getTask.resume()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.