Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEliot Murton
7,315 PointsNo code error notifications. Yet, output is not the same as in the video. Why?
I have followed the videos and my code has no error notifications. Yet, 40 seconds into the video, when we are asked ti run the programme and println the temperature I get a discrepancy. Rather than the output simply being a number, I get this:
<NSHTTPURLResponse: 0x7af95f50> { URL: https://api.forecast.io/forecast/6f3bd180cccb667a7f39dfbb00e9a8e7/-42.785829,147.061822 } { status code: 200, headers {
"Cache-Control" = "max-age=854";
Connection = close;
"Content-Encoding" = gzip;
"Content-Type" = "application/json; charset=utf-8";
Date = "Fri, 13 Feb 2015 14:45:46 GMT";
Etag = "\"-1001087721\"";
Expires = "Fri, 13 Feb 2015 15:00:00 +0000";
Server = "nginx/1.1.19";
"Transfer-Encoding" = Identity;
"X-Forecast-API-Calls" = 3;
"X-Hostname" = "cowrie-shell";
"X-Powered-By" = Express;
"X-Response-Time" = 98ms;
} }
60
Why?
1 Answer
Ronald Hunter
Courses Plus Student 17,851 PointsYou still have the println(response) by your void in the let downloadTask:NSURLSessionDownloadTask
Eliot Murton
7,315 PointsEliot Murton
7,315 PointsThe "60" must be the output I am looking for but I dont want it with all the other infom. Here is the code from the ViewController that got me here: