Skip to content

Fonigle/maple-request

Repository files navigation

maple-request

vue plugin to manage your requests


npm npm bundle size (minified) GitHub

HomePage

request.maple-ui.com

Useage

Install

  $ npm install --save maple-request

Quick Start

index.js:

import Vue from 'vue';
import MapleRequest from 'maple-request';

Vue.use(MapleRequest, {
    apis: {
        requestA: {
            url: 'https://some-domain.com/api/requestA',
        },
    },
});

app.vue:

<template>
    <div class="app"></div>
</temlate>
<script>
    export default {
        mounted(){
            this.$request('requestA')
                .then(response=> {})
                .catch(error=> {})
        }
    }
</script>

LICENSE

MIT