0.2.0 ā€¢ Published 5 years ago

@maltose/http v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

HTTP

Build Status License Version

šŸ”— 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");