Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omgimalexis/vue-frisbee
A small wrapper for integrating Frisbee to Vuejs
https://github.com/omgimalexis/vue-frisbee
frisbee http vue vue-plugin
Last synced: 29 days ago
JSON representation
A small wrapper for integrating Frisbee to Vuejs
- Host: GitHub
- URL: https://github.com/omgimalexis/vue-frisbee
- Owner: OmgImAlexis
- License: mit
- Created: 2018-02-05T08:16:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-26T03:55:14.000Z (about 4 years ago)
- Last Synced: 2024-10-14T07:53:34.541Z (about 1 month ago)
- Topics: frisbee, http, vue, vue-plugin
- Language: JavaScript
- Homepage:
- Size: 75.2 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-frisbee
A small wrapper for integrating [Frisbee](https://github.com/niftylettuce/frisbee) to Vuejs## How to install:
### CommonJS:
```console
$ yarn add frisbee vue-frisbee
```And in your entry file:
```js
import Vue from 'vue';
import frisbee from 'frisbee';
import VueFrisbee from 'vue-frisbee';Vue.use(VueFrisbee, frisbee);
```### Script:
Just add 3 scripts in order: `vue`, `frisbee` and `vue-frisbee` to your `document`.## Usage:
This wrapper will bind `frisbee` to `Vue` or `this` if you're using single file component.You can `frisbee` like this:
```js
Vue.frisbee.get('/').then(res => {
console.log(res.body);
});this.frisbee.get('/').then(res => {
console.log(res.body);
});this.$http.get('/').then(res => {
console.log(res.body);
});
```