This forum is now read-only. Please use our new forums at

How to use APIs with JavaScript Forum

View Course

395 points
Submitted by
Tracy Alison King
almost 3 years ago

What is wrong with my HTTP Code

Screenshot of question, code and error:

Here is the code I am attempting to execute:

var xhr = new XMLHttpRequest();"GET", "", false);

// Add your code above this line!


17 votes

Best answer


Hello :)

This is a bug. As you may know, some time ago codecademy has moved fully to https protocol. I guess it is the cause of the problem.

Please try to use secure version of the link:"GET", "", false);

2383 points
Submitted by
Maciej Wiercioch
almost 3 years ago


Acca95551023b8e3887a863808a61cb1?s=140&d=retro Vinnie420 almost 3 years ago

this worked thanks

571828824b7f51f26c000619_875219903 Maciej Wiercioch almost 3 years ago

Great! You're welcome :)

559c6dcae39efe6ee2000595_444191707 Jason Ruiz almost 3 years ago

thank you so much, I've been searching this solution thanks again

571828824b7f51f26c000619_875219903 Maciej Wiercioch almost 3 years ago

I'm happy it's helpful :)

5611308495e378ea51000018_385979275 omar_khayyam almost 3 years ago

I had the same problem. When I changed to it to "https" it worked fine. This bug should be taken care of...

571828824b7f51f26c000619_875219903 Maciej Wiercioch over 2 years ago

Yes, you are right, but there are bugs that are with us for few years :) Be patient.

5611308495e378ea51000018_385979275 omar_khayyam over 2 years ago

Well at least there are dedicated guys like you who help others fix these bugs before an "official" solution :)

Picture Clinton Medbery over 2 years ago

It's not really a bug. It would literally take just updating the block to say https. It's not like you have to reprogam anything.