vue-resource is a plugin for Vue.js which provides services for making web requests and handle responses using a XMLHttpRequest or JSONP. You can install it via yarn or NPM. Available on jsdelivr, unpkg or cdnjs. Typescript for vue-resource should work out of the box since the type definition files are included within the npm package. The http service can be used globally Vue.http or in a Vue instance this.$http. A Vue instance provides the this.$http service which can send HTTP requests. A request method call returns a Promise that resolves to the response. Also the Vue instance will be automatically bound to this in all function callbacks. Shortcut methods are available for all request types. These methods work globally or in a Vue instance. The Recipes provide code examples to common use-cases. If you want to share your recipe feel free to send a pull request.
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)
- You can install it via yarn or NPM