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

How to use APIs with JavaScript Forum

View Course » View Exercise

617 points
55c12cf993767635700002ab_539706354
Submitted by
Jon Ryan
about 2 years ago

NETWORK_ERR: NETWORK_ERR: XMLHttpRequest Exception 101

    // Add your code below this line!
var xhr= new XMLHttpRequest(); 
    xhr.open("GET", "http://www.codecademy.com/", false);

xhr.send();



// Add your code above this line!

console.log(xhr.status);
console.log(xhr.statusText);

Here is my code... What am I doing wrong? I keep receiving this message:

NETWORK_ERR: NETWORK_ERR: XMLHttpRequest Exception 101

27 votes

permalink

I found the issue myself.

I had to chang the URL on the xhr.open to:

xhr.open("GET", "https://www.codecademy.com/", false);

617 points
55c12cf993767635700002ab_539706354
Submitted by
Jon Ryan
about 2 years ago

5 Comments

C800bc436feac5e218a3eeee58aea172?s=140&d=retro Richard Jackson about 2 years ago

Yeah I just had exactly the same problem. It's crazy that the text in the question is actually wrong.

55cedaa29113cb20d90002cd_744347295 theposthuman about 2 years ago

Yes, just needed https. It would be cool to let devs @ Codecademy to fix it.

55d64a6993767675680005b4_442992972 Brendan O'Connor about 2 years ago

Yup, was actually looking for a place to report the error (like in the command line tutorials)

50c0c59ea2de0d2e58001507_873047540 Edward Dahllöf about 2 years ago

thank you! I have spent too much time on this!

550bdda8e39efe8d98001908_123247928 Marcus Handley about 2 years ago

had the same problem hopefully the developers could add in that extra s to our task description-not to hard


0 votes

permalink

Thanks so much Jon! Glad I ran into this.

131 points
514042e6f99359baa8516a2b4aaa5844?s=140&d=retro
Submitted by
letthewriterswrite
about 2 years ago


0 votes

permalink

Greatly appreciated! Issue fixed.

1138 points
Picture
Submitted by
Dari Cabrera
about 2 years ago


0 votes

permalink

Thanks for the fix!

512 points
Picture
Submitted by
Jose Huerta
about 2 years ago