Useful utilities for working with Fetch
[!WARNING] This package is still a work in progress.
For more features and conveniences on top of Fetch, check out my ky
package.
npm install fetch-extras
import {throwIfHttpError} from 'fetch-extras';
const response = await throwIfHttpError(fetch('/api'));
See the types for now.