open XHR before setting properties on it
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -125,6 +125,7 @@ var | ... | @@ -125,6 +125,7 @@ var |
125 | } | 125 | } |
126 | 126 | ||
127 | request = new window.XMLHttpRequest(); | 127 | request = new window.XMLHttpRequest(); |
128 | request.open(options.method, url); | ||
128 | 129 | ||
129 | if (responseType) { | 130 | if (responseType) { |
130 | request.responseType = responseType; | 131 | request.responseType = responseType; |
... | @@ -133,7 +134,6 @@ var | ... | @@ -133,7 +134,6 @@ var |
133 | request.withCredentials = true; | 134 | request.withCredentials = true; |
134 | } | 135 | } |
135 | 136 | ||
136 | request.open(options.method, url); | ||
137 | request.onreadystatechange = function() { | 137 | request.onreadystatechange = function() { |
138 | // wait until the request completes | 138 | // wait until the request completes |
139 | if (this.readyState !== 4) { | 139 | if (this.readyState !== 4) { | ... | ... |
-
Please register or sign in to post a comment