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 2017 Building a Command Line Application Making a GET Request with https

Pedro Esteves
Pedro Esteves
13,125 Points

Status code 406.

When I repeat the steps made by Andrew, I get the statusCode 406. Why? How can I solve this?

Thanks a lot everyone.

You problably are sending unacepted charset or language to the GET request, above some text of mozila development network:

"The HTTP 406 Not Acceptable client error response code indicates that a response matching the list of acceptable values defined in Accept-Charset and Accept-Language cannot be served."

Pedro Esteves
Pedro Esteves
13,125 Points

Thanks for your answer Iagor. I'm not having the error anymore but I don't really know why. I rewrote the code and now it works.