@8bu/axios
v0.0.3
Published
Axios with repository pattern
Downloads
9
Readme
@8bu/axios
Usage
import { createApiClient, createRepository } from '@8bu/axios'
const BASE_URL = 'https://622f7a673ff58f023c21c7fb.mockapi.io'
// If you want to use axios instance without wrapper
const client = createApiClient(BASE_URL)
// If you want to use wrapper with built-in param serializer & bigint parser
const coreApi = createRepository(BASE_URL)
const users = (await coreApi.GET<User[]>('/users')).data