1.0.3 • Published 2 years ago
http-fetch-wrapper v1.0.3
HTTP Fetch Wrapper
Http client wrapper around fetch
Usage
import { API } from 'http-fetch-wrapper';
const api = new API({
baseURL: 'http://localhost:3000',
});
const data = await api.get('/animals');
Response
export interface APIResponse<DataType = any> {
data: DataType,
status: number,
raw?: Response,
type?: string,
}