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

99 points
548378969113cbde03000264_21721078
Submitted by
minecraftcoder990
almost 3 years ago

16/19 WHY WONT THIS WORK

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

// Add your code above this line!

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

16 votes

Best answer

permalink

It's actually http://www.codecademy.com, not http://www.codeAcademy.com. Got me too.

728 points
54cf0925e39efe08c3004b82_185946144
Submitted by
Shawn
almost 3 years ago

1 Comment

Picture kpeshawaria15 about 2 years ago

... never realized that until just now


3 votes

permalink

In the method xhr.open(); the URL should be codecademy and not codeacademy...

i thought this website was codeacademy until now .

770 points
Picture
Submitted by
Rikesh Bhansari
over 2 years ago

1 Comment

Picture Dave Ty over 2 years ago

You, sir, win the Internets. I've used this site for nearly a year and thought the same thing up until now. Thank you!


1 vote

permalink

Pff. me tooo :)
They got the domain, they should redirect all the requests.

412 points
Picture
Submitted by
Alen Todorov
almost 3 years ago


1 vote

permalink

Yep- The solution is the link is "http://www.codecademy.com/" Notice the spelling, not ACADEMY, but CADEMY, thanks typos!!

726 points
074dbabb360020d7d72118f5f1b4541a?s=140&d=retro
Submitted by
CaptainSteve21
over 2 years ago


0 votes

permalink

THE ANSWER IS JSON< NEVER MIND SORRY!

105 points
21265a0bc55a91ffd3dc4b4a13216e99?s=140&d=retro
Submitted by
Arden Hudson
almost 3 years ago


0 votes

permalink

ya, the right answer does not work on this. what's up?

324 points
621cb4157ebc87055d11a78eb41da683?s=140&d=retro
Submitted by
Jeremy Simon
over 2 years ago

1 Comment

55df2afa95e3787b9200005e_359368177 Judy over 2 years ago

Hi Jeremy, what do you think that the right answer is?


0 votes

permalink

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

xhr.send();

// Add your code above this line!

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

626 points
54d20573d3292fa5fa001d09_938263087
Submitted by
umidjonmamatov
over 2 years ago


-2 votes

permalink

They have got to make the difference more obvious, I spent waaaay too much time on this question because of this stupid typo. -___-
So very miffed...

468 points
5541a93ae39efefe5f00047e_946065555
Submitted by
MoMo
over 2 years ago