@aspida/ky
Getting Started
Installation
Make HTTP request from application
src/index.ts
import ky from "ky"
import aspida from "@aspida/ky"
import api from "../api/$api"
const kyConfig = { timeout: 3000, prefixUrl: "https://example.com/api" }
const client = api(aspida(ky, kyConfig))
;(async () => {
const userId = 0
const limit = 10
await client.v1.users.post({ name: "mario" })
const res = await client.v1.users.get({ query: { limit } })
console.log(res)
const user = await client.v1.users._userId(userId).$get()
console.log(user)
})()
License
@aspida/ky is licensed under a MIT License.