Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 780 Bytes

README.md

File metadata and controls

39 lines (30 loc) · 780 Bytes

vue-http

About

vuejs jQuery-like ajax facade plugin for axios library

Usage


The library can be used as a vuejs plugin:

import vHttp from  'vue-http';
Vue.use(vHttp);

API


$ajaxSetup(config)

Set global configuration values that will be applied to every request

$ajaxSetup({
    headers: {
        'Authorization': 'bearer hello-world'
    },
    responseType: 'stream'
});

$get(url: string, config): Promise

Executes a GET request to the specific resource

$post(url: string, data, config): Promise

Executes a POST request to the specific resource

$del(url: string, config): Promise

Executes a DELETE request

$put(url: string, data, config): Promise

Executes a PUT request to the specific resource