https://github.com/dplewis/node-xmlhttprequest2
https://github.com/dplewis/node-xmlhttprequest2
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dplewis/node-xmlhttprequest2
- Owner: dplewis
- License: mit
- Created: 2019-11-22T19:01:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-07T01:09:02.000Z (over 5 years ago)
- Last Synced: 2025-02-04T14:27:58.492Z (4 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-XMLHttpRequest2 #
node-XMLHttpRequest2 is a wrapper for the built-in http client to emulate the
browser XMLHttpRequest object.This can be used with JS designed for browsers to improve reuse of code and
allow the use of existing libraries.Note: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/).
## Usage ##
Here's how to include the module in your project and use as the browser-based
XHR object.var XMLHttpRequest = require("xmlhttprequest2").XMLHttpRequest;
var xhr = new XMLHttpRequest();Note: use the lowercase string "xmlhttprequest2" in your require(). On
case-sensitive systems (eg Linux) using uppercase letters won't work.## License ##
MIT license. See LICENSE for full details.
## Supports ##
* Async and synchronous requests
* GET, POST, PUT, and DELETE requests
* All spec methods (open, send, abort, getRequestHeader,
getAllRequestHeaders, event methods)
* Requests to all domains## Acknowledgements ##
This is a fork of [node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest).