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 trialznzlcrstkk
Front End Web Development Techdegree Graduate 28,511 PointsPlease help because i'm stuck
Now, in the http.get() call pass in an anonymous function as a callback with the parameter of response. This function is the second parameter in the get call.
var http = require("http");
var https = require("https");
http.get("http://teamtreehouse.com/chalkers.json")
https.get("https://teamtreehouse.com/chalkers.json")
Steven Parker
231,275 PointsThe callback is added in task 3. Matas was apparently stuck at task 2.
2 Answers
Steven Parker
231,275 PointsThere's a typo in the challenge.
Instead of "http.get()
", the instructions should say "https.get()
". Add your callback to that call.
Also, the instructions in the earlier tasks do not ask for the http
module to be included or called. The typo might have been more obvious if you had not added them to start with.
znzlcrstkk
Front End Web Development Techdegree Graduate 28,511 Pointsbcan you write me the code, how it has to be look like
Steven Parker
231,275 PointsI'd rather not give an explicit answer. If you're not sure how to construct your callback, I recommend that you take another look at the examples shown in the video.
froilanmedin
965 Pointsfroilanmedin
965 Pointsyea i plugged this is in and im pretty sure it is wrong because there is no callback for the function.