@maltose/http
v0.2.0
Published
Yet another http library based on fetch.
Downloads
2
Readme
HTTP
🔗 Yet another http library based on fetch.
Installation
yarn add @maltose/http
Usage
import http, { createHTTPClient } from "@maltose/http";
const result = await http.get("/api/posts");
const api = createHTTPClient({
middlewares: [
next => (endpoint, options) =>
next(process.env.API_ROOT + endpoint, options),
],
});
const result = await api.get("/posts");