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 trial

JavaScript Node.js Basics (2014) Building a Command Line Application Making a GET Request with http

jsdevtom
jsdevtom
16,963 Points

404 Errors can be caused by the security settings on your Treehouse account

If, like me, the 'Allow everyone to see your profile' box is UNCHECKED. The json file is not accessible, (I believe). When I used https.get('https://teamtreehouse.com/chalkers.json', function(response){ instead of my profile's JSON file, it worked.

I hope this helps :-)

thanks! big help

Thank you! I was wondering why I was getting that status code.

2 Answers

Stephen O'Connor
Stephen O'Connor
22,291 Points

This was my issue. Thanks for pointing it out.

jsdevtom
jsdevtom
16,963 Points

Glad it helped :-)

Hi, I am getting 406 for status code. What is it? I have changed http to https and the account is public.

Okay, it was simply the spelling mistake in URL. Because it wasn't 404, I wondered what 406 is.