title: Get videos from Vimeo channel using AJAX without jQuery
body: <p>I'm trying to write a simple AJAX method to get a list of videos from Vimeo without using jQuery. I realize that I must use the JSONP format because it is a cross-domain request. However, the result returned is always 200 OK and it is always empty. Here's my method:</p>
  
  <pre><code>var httpRequest = new XMLHttpRequest();
  
  httpRequest.open("GET", "http://vimeo.com/api/v2/channel/staffpicks/videos.json?callback=?", true);
  httpRequest.send();
  
  httpRequest.onreadystatechange = function () {
      if (httpRequest.readyState == 0) {
          console.log("0");
      }
      if (httpRequest.readyState == 1) {
          console.log("1");
      }
      if (httpRequest.readyState == 2) {
          console.log("2");
      }
      if (httpRequest.readyState == 3) {
          console.log("3");
      }
      if (httpRequest.readyState == 4 &amp;&amp; httpRequest.status == 200) {
          console.log("4");
      }
      if (httpRequest.readyState == 4 &amp;&amp; httpRequest.status == 404) {
          console.log("5");
      }
  };
  </code></pre>
  
  <p>The console logs 2, but not 0, 1, 3, 4, or 5. It's always just 2.</p>
  
  <p>By the way, this doesn't have to be a Vimeo request. The only reason I'm using a Vimeo URL is because I don't know how else to test an AJAX request than to hit an actual site.</p>