vue-resource

The HTTP client for Vue.js

Github星跟踪图

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

主要指标

概览
名称与所有者pagekit/vue-resource
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2014-02-07 23:07:56
推送于2022-12-08 21:37:18
最后一次提交2021-06-14 14:02:28
发布数53
最新版本名称1.5.3 (发布于 2021-06-14 14:02:28)
第一版名称0.1.0 (发布于 )
用户参与
星数10.1k
关注者数256
派生数1.6k
提交数483
已启用问题?
问题数536
打开的问题数83
拉请求数30
打开的拉请求数30
关闭的拉请求数82
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?