Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zswang/irequest
request to class
https://github.com/zswang/irequest
ajax request
Last synced: about 1 month ago
JSON representation
request to class
- Host: GitHub
- URL: https://github.com/zswang/irequest
- Owner: zswang
- License: mit
- Created: 2017-12-08T07:07:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T03:09:00.000Z (over 6 years ago)
- Last Synced: 2024-11-20T09:51:42.266Z (about 1 month ago)
- Topics: ajax, request
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
irequest
-----------# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]
request to class
## Install 安装
```sh
$ npm install --save irequest
```## Usage 使用方法
### Bind and trigger events 绑定和触发事件
```js
const rb = new irequest.RequestBase()rb.request(`http://localhost:3000/api/user`).then((reply) => {
console.log(reply)
})
```## License
MIT © [zswang](http://weibo.com/zswang)
[npm-url]: https://npmjs.org/package/irequest
[npm-image]: https://badge.fury.io/js/irequest.svg
[travis-url]: https://travis-ci.org/zswang/irequest
[travis-image]: https://travis-ci.org/zswang/irequest.svg?branch=master
[coverage-url]: https://coveralls.io/github/zswang/irequest?branch=master
[coverage-image]: https://coveralls.io/repos/zswang/irequest/badge.svg?branch=master&service=github