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

831 points
30032d653b8f4171d4cc764302060bdd?s=140&d=retro
Submitted by
Jules
over 3 years ago

Not sure what's wrong here...

So I've seen the other messages about changing the doesnt_exist page, but I'm not even getting a 200 for it... I'm really not sure what's wrong with this:

var xhr = new XMLHttpRequest();
xhr.open("POST", "http://www.codecademy.com/doesnt_existcytvuybinjhg", false);
xhr.send();
// Add your code below!
console.log(xhr.status)

I just get this:

NetworkError: A network error occurred.

Anyone see what I've missed?


1 vote

permalink

http://www.codecademy.com/doesnt_existcytvuybinjhg

it doesn't exist.so you got it error.

Try codecademy 's homepage URL or its other URL even without the last few letters still works,for instances:

"http://www.codecademy.com/" 
"http://www.codecademy.com/forum_questions/52d04a7252f863418600083b"  
"http://www.codecademy.com/foru"

1334 points
5382ff7052f863954b006e6f_777979731
Submitted by
Zhouhancheng
about 3 years ago


1 vote

permalink

Try as this one:
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://www.codecademy.com/doesnt_exist", false);
xhr.send();
// Add your code below!
console.log(xhr.status);

344 points
A82634644b4219706ffe56408631ea66?s=140&d=retro
Submitted by
joshua moon
over 1 year ago