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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?