Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pagekit/vue-resource
The HTTP client for Vue.js
https://github.com/pagekit/vue-resource
http-client javascript vue vue-resource
Last synced: about 1 month ago
JSON representation
The HTTP client for Vue.js
- Host: GitHub
- URL: https://github.com/pagekit/vue-resource
- Owner: pagekit
- License: mit
- Archived: true
- Created: 2014-02-07T23:07:56.000Z (over 10 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-08T21:37:18.000Z (over 1 year ago)
- Last Synced: 2024-04-16T05:50:51.525Z (about 2 months ago)
- Topics: http-client, javascript, vue, vue-resource
- Language: JavaScript
- Homepage:
- Size: 1.68 MB
- Stars: 10,109
- Watchers: 259
- Forks: 1,608
- Open Issues: 113
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-stars - vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-stars - pagekit/vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-fullstack - Vue-resource
- awesome-stars - pagekit/vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-github-star - vue-resource
- awesomer-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-stars - vue-resource
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-stars - vue-resource
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome - pagekit/vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-andy-node - vue-resource - HTTP Client for Vue (Packages / VueJS)
- awesome-stars - vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-stars - vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-vue. - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesomereads - Vue-resource
- awesome-stars - pagekit/vue-resource - The HTTP client for Vue.js (JavaScript)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-vue - vue-resource ★8989 - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- awesome-vue - vue-resource - The HTTP client for Vue.js. (Components & Libraries / Utilities)
- awesome-vuejs - vue-resource - The HTTP client for Vue.js. (Utilities / HTTP Requests)
- my-awesome-stars - pagekit/vue-resource - The HTTP client for Vue.js (JavaScript)
README
# vue-resource [![Build](https://circleci.com/gh/pagekit/vue-resource.svg?style=shield)](https://circleci.com/gh/pagekit/vue-resource) [![Downloads](https://img.shields.io/npm/dm/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![jsdelivr](https://data.jsdelivr.com/v1/package/npm/vue-resource/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vue-resource) [![Version](https://img.shields.io/npm/v/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![License](https://img.shields.io/npm/l/vue-resource.svg)](https://www.npmjs.com/package/vue-resource)
The plugin for [Vue.js](http://vuejs.org) provides services for making web requests and handle responses using a [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) or JSONP.
## Features
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API and [URI Templates](https://medialize.github.io/URI.js/uri-template.html)
- Supports [interceptors](docs/http.md#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](https://yarnpkg.com/) or [NPM](http://npmjs.org/).
```
$ yarn add vue-resource
$ npm install vue-resource
```### CDN
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/[email protected]), [unpkg](https://unpkg.com/[email protected]) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
```html```
## Example
```js
{
// GET /someUrl
this.$http.get('/someUrl').then(response => {// get body data
this.someData = response.body;}, response => {
// error callback
});
}
```## Documentation
- [Configuration](docs/config.md)
- [HTTP Requests/Response](docs/http.md)
- [Creating Resources](docs/resource.md)
- [Code Recipes](docs/recipes.md)
- [API Reference](docs/api.md)## Changelog
Details changes for each release are documented in the [release notes](https://github.com/pagekit/vue-resource/releases).
## Contribution
If you find a bug or want to contribute to the code or documentation, you can help by submitting an [issue](https://github.com/pagekit/vue-resource/issues) or a [pull request](https://github.com/pagekit/vue-resource/pulls).
## License
[MIT](http://opensource.org/licenses/MIT)