kst-util

1.1.2 • Public • Published

kst-util

npm version build status code coverage install size npm downloads gitter chat

Promise based HTTP client for the browser and node.js

Features

  • Make XMLHttpRequests from the browser
  • Make http requests from node.js
  • Supports the Promise API
  • Intercept request and response
  • Transform request and response data
  • Cancel requests
  • Automatic transforms for JSON data
  • Client side support for protecting against XSRF

Browser Support

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 11 ✔

Installing

Using npm

npm install kst-util

Using yarn

yarn add kst-util

Using bower

bower install kst-util

Using cdn

<script src="https://unpkg.com/kst-util/dist/umd/kst.min.js"></script>

Quick Start

Using global variable K

    //example
    K.$ajax.get('url').then(res=>{
 
    })
    // ...

Or using in Vue

import Vue from 'vue'
import K from 'kst-util'
 
Vue.use(K)
 
//using example : this.$K

Example

methods

Readme

Keywords

Package Sidebar

Install

npm i kst-util

Weekly Downloads

14

Version

1.1.2

License

MIT

Unpacked Size

71.1 kB

Total Files

23

Last publish

Collaborators

  • cgj