Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Cocoa
let session = URLSession(configuration: URLSessionConfiguration.default)
var getTask = URLSessionTask()
var request = URLRequest(url: URL(string: "")!)
request.httpMethod = "GET"
getTask = session.dataTask(with: request, completionHandler: { (data, response, error) in
debugPrint("(data \(data != nil), response \(response), error \(response)")
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.