0.1.4 • Published 2 years ago

zodios-plugin-ky v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Ky plugin for Zodios

This is a simple plugin for Zodios that allows you to use Ky as a HTTP client.

How to use

```js
import ky from 'ky-universal'
import { KyZodios, KyPlugin } from '@phongnd39/zodios-plugin-ky'

const apiClient = new KyZodios('apiUrl', 'zodiosApiDefinition', { ...zodiosOptions })
apiClient.use(KyPlugin({ kyInstance: ky.create({ ...kyOption }) }))
apiClient.get('endpoint', { ...params }).json() // or other ky methods
```

Options

kyInstance

The Ky instance to use. If not provided, the default Ky instance will be used.

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago