Comparing version 1.1.0 to 1.2.0
@@ -23,4 +23,11 @@ var XMLHttpRequest = require('xhrpolyfill'); | ||
} | ||
xhr.onload=function(response){callback(this.response, response, xhr);}; | ||
xhr.onload=function(response){ | ||
var headerJSON = {}, h = xhr.getAllResponseHeaders(); | ||
h.match(/([^\n\r:]+):([^\n\r]+)/g).forEach(function(item){ | ||
var tmp = item.split(': '); | ||
json[tmp[0]] = tmp[1]; | ||
}); | ||
callback(this.response, response, xhr, headerJSON); | ||
}; | ||
xhr.send(args.body||null); | ||
}; |
{ | ||
"name": "minixhr", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "super simpel and small cross-browser xhr", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2602
31