A lightweight HTTP service wrapper around the Fetch API offering get, post, put, patch, and delete methods with query parameter and body support. Current version 0.2.1 is an early release with limited adoption. It simplifies fetch requests by providing a clean, promise-based interface and optional credential/cross-domain flags. Compared to axios or ky, it is minimal and unopinionated but lacks advanced features like interceptors, retries, or timeout handling. Suitable for simple projects or as a learning tool.
npm install fetch-http-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic GET with query params and POST with JSON body using the fetch wrapper.
Use import { del } from 'fetch-http-service' instead of trying to import 'delete'.Pin to exact version and test upgrades carefully.
Manually check response.ok and throw if needed.
Test thoroughly or polyfill fetch credentials/ CORS behavior.
Use import { get } from 'fetch-http-service' instead of import get from 'fetch-http-service'.Use import { del } from 'fetch-http-service' instead.Add manual check: if (!response.ok) throw new Error('HTTP error ' + response.status);