avarice

Yet another HTTP client based on Fetch.

Usage no npm install needed!

<script type="module">
  import avarice from 'https://cdn.skypack.dev/avarice';
</script>

README

Avarice

😋 Yet another HTTP client based on Fetch.

Installation

yarn add avarice

Usage

import { http } from "avarice";

const result = await http.get("/api/posts");
import { createHTTPClient } from "avarice";

const http = createHTTPClient({
  middlewares: [
    next => (endpoint, options) => {
      return next("/api/" + endpoint, options);
    },
  ],
});

const result = await http.get("posts");