uupaa.xhrproxy.js

0.0.7 • Public • Published

XHRProxy.js Build Status

npm

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);
});

Package Sidebar

Install

npm i uupaa.xhrproxy.js

Weekly Downloads

1

Version

0.0.7

License

MIT

Last publish

Collaborators

  • uupaa