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

How to use APIs with JavaScript Forum

View Course

443 points
E330dd24a0bcad11e2786a7092ff681f?s=140&d=retro
Submitted by
Djurre
about 2 years ago

Network error 1/19

in both 1/19 and 5/19 I keep on getting the error:
NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://www.codecademy.com/'.
with the code:

var xhr = new XMLHttpRequest();
xhr.open("GET", "http://www.codecademy.com/", false);
xhr.send();
console.log(xhr.status);
console.log(xhr.statusText);


3 votes

permalink

change the "http" part to "https" such that the URL is

https://www.codecademy.com

1166 points
52d27e7d8c1ccc03bf003302_671859176
Submitted by
Michael
about 2 years ago

2 Comments

E330dd24a0bcad11e2786a7092ff681f?s=140&d=retro Djurre about 2 years ago

The 's' did the trick. Thanks a lot !

5576f0b6e39efe7f89000468_810358479 dharris1893 about 2 years ago

I wonder why it's not automatically put in the lesson, or are we expected to know to change the http to https? The API section did say to look into some of Codecademy's JavaScript section. I guess I may have to look into it.