Commit 748277e7 authored by Yehuda Katz's avatar Yehuda Katz

Merge pull request #19 from daliwali/master

Fix typos in readme
parents a69b2dcf 43bc8fda
...@@ -55,11 +55,12 @@ Here is an example of a simple XHR2 wrapper written using RSVP.js: ...@@ -55,11 +55,12 @@ Here is an example of a simple XHR2 wrapper written using RSVP.js:
var getJSON = function(url) { var getJSON = function(url) {
var promise = new RSVP.Promise(); var promise = new RSVP.Promise();
var client = new XMLHTTPRequest(); var client = new XMLHttpRequest();
client.open("GET", url); client.open("GET", url);
client.onreadystatechange = handler; client.onreadystatechange = handler;
client.responseType = "json"; client.responseType = "json";
client.setRequestHeader("Accept", "application/json"); client.setRequestHeader("Accept", "application/json");
client.send();
function handler() { function handler() {
if (this.readyState === this.DONE) { if (this.readyState === this.DONE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment