You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
林华焜
b6f8f922cf
|
4 years ago | |
---|---|---|
.. | ||
.circleci | 4 years ago | |
.github | 4 years ago | |
dist | 4 years ago | |
src | 4 years ago | |
test | 4 years ago | |
types | 4 years ago | |
.babelrc.js | 4 years ago | |
.eslintignore | 4 years ago | |
.eslintrc.js | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
package.json | 4 years ago |
README.md
vue-resource
The plugin for Vue.js provides services for making web requests and handle responses using a XMLHttpRequest or JSONP.
Features
- Supports the Promise API and URI Templates
- Supports interceptors for request and response
- Supports latest Firefox, Chrome, Safari, Opera and IE9+
- Supports Vue 1.0 & Vue 2.0
- Compact size 14KB (5.3KB gzipped)
Installation
You can install it via yarn or NPM.
$ yarn add vue-resource
$ npm install vue-resource
CDN
Available on jsdelivr, unpkg or cdnjs.
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.2"></script>
Example
{
// GET /someUrl
this.$http.get('/someUrl').then(response => {
// get body data
this.someData = response.body;
}, response => {
// error callback
});
}
Documentation
Changelog
Details changes for each release are documented in the release notes.
Contribution
If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request.