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 trialM. Brown
29,923 PointsNot getting this.
Just look at the second part of the code posted starting on line 7.
var https = require("https");
https.get("https://teamtreehouse.com/chalkers.json");
var http = require('http');
http.get("http://teamtreehouse.com/chalkers.json", function(response){
});
1 Answer
andren
28,558 PointsThere is an error in the instructions for the task.
Even though they reference http.get()
in the third task they are actually talking about the https.get()
call from the previous two tasks.
So you don't have to import http.get()
or call it. You just need to modify the https.get()
call from the previous task like this:
var https = require("https");
https.get("https://teamtreehouse.com/chalkers.json", function(response){
});
This challenge used to use the http.get()
method in the past before Treehouse switched to https. So it's likely an instance of them forgetting to update the instructions for that specific part of the challenge.