Created
November 2, 2015 15:54
-
-
Save kkirsche/9089fc3442f2f6562a85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let baseURL = NSURL(string: "https://api.forecast.io/forecast/\(forecastAPIKey)/") | |
| let forecastURL = NSURL(string: "60.7142,-80.0064", relativeToURL: baseURL) | |
| let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() | |
| let session = NSURLSession(configuration: configuration) | |
| let request = NSURLRequest(URL: forecastURL!) | |
| let dataTask = session.dataTaskWithRequest(request, completionHandler: { | |
| (data: NSData?, response: NSURLResponse?, error: NSError?) -> Void in | |
| print(data!) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment