vue-ky-plugin
Simple a ky plugin for vue
291
| Install | |
|---|---|
npm install vue-ky-plugin |
|
| Latest Version: | 1.0.4 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Dec 15, 2018 |
| Links: | GitHub · npm |
Maintainer: andreabbondanza
Ky Vue Plugin
Typescript vue ky plugin.
Based on ky package
This plugin simply extend the vue object with ky. It can also create a base instance to use directly from vue.
Install
npm install vue-ky-plugin --save
Import in Vue
In your entry set:
import Vue from 'vue';
import KyPlugin from './vue-ky-plugin';
Vue.use(KyPlugin);
// or
import ky from 'ky';
Vue.use(KyPlugin, ky.extend({prefixUrl: 'https://example.com/api'}))
How to use
In your components just do
// just do
(async () => {
await this.$ky('unicorn', {prefixUrl: '/api'});
})();
How ky works
Check ky github page
Know Issues
Other
Related Packages
@hey-api/openapi-ts
🌀 OpenAPI to TypeScript code generator. Production-grade SDKs, Zod schemas, Tan...
127,850,437
5,511
@ohos-ports/openapi-ts
🌀 OpenAPI to TypeScript code generator. Production-grade SDKs, Zod schemas, Tan...
0
6
tanstack-fetch
TanStack Query fetch client — typed errors, AbortSignal, SSR, SSE, upload. React...
3,225
3
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.4 | ^2.5.21 | MIT | |
| 1.0.3 | ^2.5.21 | MIT | |
| 1.0.2 | ^2.5.21 | MIT | |
| 1.0.1 | ^2.5.21 | MIT | |
| 1.0.0 | ^2.5.21 | MIT |