kst-util
v1.1.2
Published
js util
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-utilUsing yarn
yarn add kst-utilUsing bower
bower install kst-utilUsing 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