uupaa.xhrproxy.js
v0.0.7
Published
XMLHttpRequest proxy for Browser and WebWorkers
Downloads
13
Maintainers
Readme
XHRProxy.js
XMLHttpRequest Proxy for Browser and WebWorkers.
Document
How to use
Browser
<script src="lib/XHRProxy.js"></script>
<script>
XHRProxy.get("./index.html", function(error, responseText, xhr) {
console.log(responseText);
});
</script>
WebWorkers
importScripts("lib/XHRProxy.js");
XHRProxy.get("./index.html", function(error, responseText, xhr) {
console.log(responseText);
});
Node.js
Use NodeProxy.js.
var NodeProxy = require("uupaa.nodeproxy.js");
NodeProxy.get("./index.html", function(error, responseText, xhr) {
console.log(responseText);
});