@stone-ton/axios-wrapper
v1.0.5
Published
Axios wrapper with otlp
Downloads
174
Readme
axios-wrapper
Lib para fazer wrapper do axios
Usage
import { AxiosRequestConfig } from 'axios'
import {
axiosRequest
} from '@stone-ton/axios-wrapper'
interface FooInput {
bar: string
}
interface Foo {
id: string
bar: string
}
const result = await axiosRequest<Foo, FooInput>({
url: 'http://localhost:3000',
method: 'POST',
timeout: 3000,
data: {
bar: '🍌'
}
})
// result = {
// data: { id: '12': bar: '🍌' }
// }