The plugin for Vue.js provides services for making web requests and handle responses using a XMLHttpRequest or JSONP.
- Supports the Promise API and URI Templates
- Supports interceptors for request and response
- Supports latest Firefox, Chrome, Safari, Opera and IE9+
- Compact size 14KB (5.3KB gzipped)
You can install it via yarn or NPM.
$ yarn add vue-resource
$ npm install vue-resource
Available on jsdelivr, cdnjs or unpkg.
<script src="https://cdn.jsdelivr.net/vue.resource/1.3.1/vue-resource.min.js"></script>
{
// GET /someUrl
this.$http.get('/someUrl').then(response => {
// get body data
this.someData = response.body;
}, response => {
// error callback
});
}
Details changes for each release are documented in the release notes.
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.