0.2.0 ā¢ Published 5 years ago
@maltose/http v0.2.0
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");