The HTTP client for Vue.js
Clone or download
Latest commit e25df44 Sep 19, 2018
Permalink
Failed to load latest commit information.
.circleci update dependencies Mar 26, 2018
.github update dependencies Jul 3, 2017
build add eslint Dec 20, 2017
dist v1.5.1 May 20, 2018
docs update docs Mar 2, 2018
src add uploadProgress, downloadProgress callbacks Mar 2, 2018
test update tests Oct 3, 2017
types Fix #673 Mar 16, 2018
.eslintignore add eslint Dec 20, 2017
.eslintrc.js add eslint Dec 20, 2017
.gitignore add jasmine test Nov 6, 2015
.npmignore update docs Jan 17, 2016
LICENSE update dependencies Apr 6, 2017
README.md update dependencies Sep 19, 2018
bower.json v1.5.1 May 20, 2018
package.json update dependencies Sep 19, 2018
yarn.lock update dependencies Sep 19, 2018

README.md

vue-resource Build Downloads jsdelivr Version License

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.1"></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.

License

MIT