meathill / digest-fetch

a tiny digest fetch package for Nuxt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Digest fetch

This is a simple wrapper for fetch, to make a request with digest auth.

It uses no dependencies, can work in Edge Function environment.

Usage

import digestFetch from '@meathill/digest-fetch';

const response = await digestFetch(
  url, 
  { // data
    foo: 'bar',
  },
  {
    method: 'POST',
    realm: 'realm',
    username: 'username',
    password: 'password',
  },
);

License

MIT

About

a tiny digest fetch package for Nuxt


Languages

Language:TypeScript 92.8%Language:JavaScript 7.2%