an XMLHttpRequest
drop-in replacement using chrome.sockets.tcp for Chrome Apps
NOTE: This is still in pre-release stage, use at your own risk, cannot gaurantee functionality
- Quick start
- ChangeLog
- Documentation
- Bugs and feature requests
- Compiling
- Contributing
- Contribute and Earn
- Donating
- Community
- Versioning
- Authors
- License
Four quick start options are available:
- Download the latest release.
- Clone the repo:
git clone [email protected]:codeinchaos/chrome.sockets.tcp.xhr.git
- Install with [Bower](http://bower.io)
```bash
bower install chrome.sockets.tcp.xhr
- Install with NPM
npm install chrome.sockets.tcp.xhr
### What's included
Within the download you'll find the following files, providing both compiled and minified variations:
HTTPArchive.js/ └── dist ├── chrome.sockets.tcp.xhr.js └── chrome.sockets.tcp.xhr.min.js
### Sample Usage
making a simple XHR request with sockets:
```javascript
var xhr = new chrome.sockets.tcp.xhr();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4){
console.info(xhr.responseText);
}
};
xhr.onerror = function (error) {
console.info(error);
};
xhr.open('GET', 'http://google.com:80');
xhr.setRequestHeader('X-Requested-With', 'chrome.sockets.tcp.xhr');
xhr.send(null);
refer to the releases section for a detailed ChangeLog
Refer to chromesocketstcpxhr.readthedocs.org for detailed API documentation.
Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
This project uses Grunt. If you haven't used Grunt before, be sure to check out the Getting Started guide.
Function | Command | Description |
---|---|---|
Build | grunt |
Compiles. |
Tests | grunt test |
Runs tests. |
Watch | grunt watch |
This is a convenience method for watching. |
Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun npm install
.
Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.
Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.
Donate bitcoins to this project or make commits and get tips for it. If your commit is accepted by project maintainer and there are bitcoins on its balance, you will get a tip!
Donations are welcome to help support the continuous development of this project.
Keep track of development and updates.
- Follow @AhmadNassri & @CodeInChaos on Twitter.
- Tweet @CodeInChaos with any questions/personal support requests.
- Implementation help may be found at Stack Overflow (tagged
chrome.sockets.tcp.xhr
). - Read and subscribe to My Blog.
For transparency into our release cycle and in striving to maintain backward compatibility, this project is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible.
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major while resetting minor and patch
- New additions without breaking backward compatibility bumps the minor while resetting the patch
- Bug fixes and misc changes bumps only the patch
For more information on SemVer, please visit http://semver.org/.
Ahmad Nassri
- Twitter: @AhmadNassri
- Website: ahmadnassri.com
Licensed under the MIT license.