rob@77: # node-XMLHttpRequest # rob@77: rob@77: node-XMLHttpRequest is a wrapper for the built-in http client to emulate the rob@77: browser XMLHttpRequest object. rob@77: rob@77: This can be used with JS designed for browsers to improve reuse of code and rob@77: allow the use of existing libraries. rob@77: rob@77: Note: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/). rob@77: rob@77: ## Usage ## rob@77: rob@77: Here's how to include the module in your project and use as the browser-based rob@77: XHR object. rob@77: rob@77: var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; rob@77: var xhr = new XMLHttpRequest(); rob@77: rob@77: Note: use the lowercase string "xmlhttprequest" in your require(). On rob@77: case-sensitive systems (eg Linux) using uppercase letters won't work. rob@77: rob@77: ## Versions ## rob@77: rob@77: Prior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to rob@77: the standard major.minor.bugfix. 1.x shouldn't necessarily be considered rob@77: stable just because it's above 0.x. rob@77: rob@77: Since the XMLHttpRequest API is stable this library's API is stable as rob@77: well. Major version numbers indicate significant core code changes. rob@77: Minor versions indicate minor core code changes or better conformity to rob@77: the W3C spec. rob@77: rob@77: ## License ## rob@77: rob@77: MIT license. See LICENSE for full details. rob@77: rob@77: ## Supports ## rob@77: rob@77: * Async and synchronous requests rob@77: * GET, POST, PUT, and DELETE requests rob@77: * All spec methods (open, send, abort, getRequestHeader, rob@77: getAllRequestHeaders, event methods) rob@77: * Requests to all domains rob@77: rob@77: ## Known Issues / Missing Features ## rob@77: rob@77: For a list of open issues or to report your own visit the [github issues rob@77: page](https://github.com/driverdan/node-XMLHttpRequest/issues). rob@77: rob@77: * Local file access may have unexpected results for non-UTF8 files rob@77: * Synchronous requests don't set headers properly rob@77: * Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!). rob@77: * Some events are missing, such as abort rob@77: * getRequestHeader is case-sensitive rob@77: * Cookies aren't persisted between requests rob@77: * Missing XML support rob@77: * Missing basic auth