Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'xhr_fix' of https://github.com/dkastner/http-browserify

…into dkastner-xhr_fix
  • Loading branch information...
commit 6a3150bea277d6b06abd52a38dc261419572b192 2 parents e13740a + 19f215c
@substack authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/request.js
View
4 lib/request.js
@@ -8,6 +8,8 @@ var Request = module.exports = function (xhr, params) {
var uri = params.host + ':' + params.port + (params.path || '/');
+ xhr.open(params.method || 'GET', 'http://' + uri, true);
+
if (params.headers) {
Object.keys(params.headers).forEach(function (key) {
var value = params.headers[key];
@@ -20,8 +22,6 @@ var Request = module.exports = function (xhr, params) {
});
}
- xhr.open(params.method || 'GET', 'http://' + uri, true);
-
var res = new Response;
res.on('ready', function () {
self.emit('response', res);
Please sign in to comment.
Something went wrong with that request. Please try again.