5 It asks if I've forgotten log xhr.status


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

The error I get is

Oops, try again. Did you console.log(xhr.status)?

I've tried resetting sveral times but I get the same error each time.

Thanks!


#2

I had the same problem. Your code is fine. The issue is that you're using the GET method on HTTP when in fact the Codecademy website is HTTPS.

Simply add an s to the URL. Like this:

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