Sha256: ff10b707ac05e29c29ce7c84edb8778b0397df63377bc2ddef3cd2a01313b860
Contents?: true
Size: 508 Bytes
Versions: 41
Compression:
Stored size: 508 Bytes
Contents
function ajax_download(oArg) { if (!oArg.method) { oArg.method = "GET"; } if (!oArg.path) { throw "Missing parameter 'path'"; } if (!oArg.data) { oArg.data = null; } var xmlHttp = new XMLHttpRequest(); if (xmlHttp.overrideMimeType) { xmlHttp.overrideMimeType("text/plain; charset=x-user-defined"); } xmlHttp.open(oArg.method, oArg.path, false); xmlHttp.send(oArg.data); if (xmlHttp.readyState == 4 && xmlHttp.status == 200) { return xmlHttp.responseText; } return null; }
Version data entries
41 entries across 41 versions & 1 rubygems