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

How to use APIs with JavaScript Forum

View Course

1060 points
Cab3bcbd691e36fb59f8318e4039e085?s=140&d=retro
Submitted by
dr_sherlock
over 2 years ago

Solution to 16/19

Many people are having problem with the code , even though it is most probably correct.
The thing is you need to change the domain name from http://www.codecademy.com to https://www.codecademy.com/learn , since the former no longer exists. So the code will look something like this

var xhr = new XMLHttpRequest();
xhr.open("GET", "https://www.codecademy.com/learn", false);
xhr.send();

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


11 votes

permalink

Thanks man, it works now. Also pay attention to http"s"://...

735 points
Picture
Submitted by
asdcaszx
over 2 years ago


1 vote

permalink

Yeh the HTTPS has been a nightmare for this entire course. Wish it would get fixed.

63 points
Picture
Submitted by
AshTube
about 2 years ago


1 vote

permalink

It also works with just adding the 's' to http, without appending 'learn'. Perhaps the person who moderates this tutorial should update the instructions and hints to reflect the correct web address? It may save some people a little frustration!

491 points
55be547b9113cb947400002b_127878415
Submitted by
Carol Murphy
about 2 years ago


0 votes

permalink

man, your the best.

724 points
51b6c49652f863f12d003da0_288514487
Submitted by
Christopher Kapetanakis
about 2 years ago


0 votes

permalink

works normally if you type https instead of http

588 points
Ac3ebd0ea6f2d6fdfc0ef29adcbde65f?s=140&d=retro
Submitted by
Josri
about 2 years ago