metasploit-framework/data/js/network/ajax_post.js

18 lines
379 B
JavaScript
Raw Normal View History

2014-03-04 23:01:53 +00:00
function postInfo(path, data, cb) {
var xmlHttp = new XMLHttpRequest();
2013-10-31 18:55:22 +00:00
if (xmlHttp.overrideMimeType) {
xmlHttp.overrideMimeType("text/plain; charset=x-user-defined");
}
2014-03-04 23:01:53 +00:00
xmlHttp.open('POST', path, !!cb);
if (cb) {
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4) { cb.apply(this, arguments); }
};
}
2013-10-31 18:55:22 +00:00
xmlHttp.send(data);
}