pagekit /vue-resource

The HTTP client for Vue.js

★ 9,965⑂ 1,559👁 2⑃ 142● 536▤ 53
JavaScriptMITCreated 2014-02-07
Download: 1.5.3vue-resource-1.5.3 ↓1.5.32021-06-14
+0
Daily
9,965
stars
1,559
forks
2
watchers
142
prs
536
issues
53
releases

README

vue-resource     

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.
html



 Example
js
{
  // GET /someUrl
  this.$http.get('/someUrl').then(response = {

    // get body data
    this.someData = response.body;

  }, response = {
    // error callback
  });
}


 Documentation

- Configuration
- HTTP Requests/Response
- Creating Resources
- Code Recipes
- API Reference

 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

Top issues

Latest release

1.5.3 1.5.3 2021-06-14
Changed
- Use got version =8.0 <12.0

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON