vue-resource

The HTTP client for Vue.js

MIT 51 个版本
安装
npm install vue-resource
yarn add vue-resource
pnpm add vue-resource
bun add vue-resource
README

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

版本列表
1.5.3 2021-06-14
1.5.2 2021-03-02
1.5.1 2018-05-20
1.5.0 2018-03-03
1.4.0 2018-02-22
1.3.6 2018-02-11
1.3.5 2017-12-20
1.3.4 2017-06-08
1.3.3 2017-05-22
1.3.2 2017-05-22
1.3.1 2017-04-09
1.3.0 2017-04-06
1.2.1 2017-02-28
1.2.0 2017-02-05
1.1.2 2017-02-02
1.1.1 2017-01-31
1.1.0 2017-01-29
1.0.3 2016-09-23
1.0.2 2016-09-13
1.0.1 2016-09-09
1.0.0 2016-09-04
0.9.3 2016-07-01
0.9.2 2016-07-01
0.9.1 2016-06-25
0.9.0 2016-06-24
0.8.0 2016-06-15
0.7.4 2016-06-12
0.7.3 2016-06-11
0.7.2 2016-05-26
0.7.1 2016-05-26
0.7.0 2016-01-25
0.6.1 2016-01-13
0.6.0 2016-01-04
0.5.1 2015-12-21
0.5.0 2015-12-20
0.1.17 2015-11-07
0.1.16 2015-09-13
0.1.15 2015-08-29
0.1.14 2015-08-24
0.1.13 2015-08-11
0.1.12 2015-08-11
0.1.11 2015-08-02
0.1.10 2015-07-16
0.1.9 2015-07-15
0.1.8 2015-07-14
0.1.7 2015-07-12
0.1.6 2015-07-10
0.1.5 2015-07-06
0.1.4 2015-07-02
0.1.3 2015-06-14
0.1.2 2015-06-12