/digest-fetch

a tiny digest fetch package for Nuxt

Primary LanguageTypeScript

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