![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
node-http-xhr
Advanced tools
node-http-xhr
An implementation of XMLHttpRequest
for node.js
using
the http.request
API.
This package was written to provide the XMLHttpRequest
API to test browser
code that is being tested in a node.js
environment.
npm install --save node-http-xhr
// Standalone usage
var XMLHttpRequest = require('node-http-xhr');
// Usage as global XHR constructor
global.XMLHttpRequest = require('node-http-xhr');
var req = new XMLHttpRequest();
// Event handlers via .on${event} properties:
req.onreadystatechange = function() {
console.log('readyState: ' + req.readyState);
};
// or using .addEventListener(event, handler):
req.addEventListener('load', function() {
console.log('response: ' + req.response);
});
req.open('GET', 'https://github.com/aspyrx', true);
req.send();
If you use a bundler like browserify
or webpack
that follows the browser
field in package.json
, the module will simply export window.XMLHttpRequest
.
This is provided for sake of compatibility.
To generate documentation:
npm run doc
The html
documentation will be placed in doc/
.
npm test
Currently, some features are lacking:
loadstart
, loadend
, progress
)responseType
values other than ''
or 'text'
and corresponding parsing
overrideMimeType()
isn't very usefulsetRequestHeader()
doesn't check for forbidden headers.withCredentials
is defined as an instance property, but doesn't do anything
since there's no use case for CORS-like requests in node.js
right now.FAQs
Node.js XMLHttpRequest implementation using http.request()
The npm package node-http-xhr receives a total of 5,566 weekly downloads. As such, node-http-xhr popularity was classified as popular.
We found that node-http-xhr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.