kst-util
v1.1.2
Published
js util
Downloads
24
Readme
kst-util
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
| | | | | | --- | --- | --- | --- | --- | --- | 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