A type-safe thin wrapper around the fetch API for interacting with external APIs. Current stable version is 4.1.1, actively maintained with TypeScript support. It provides features like base URL configuration, automatic JSON body stringification, URL params and query composition, request/response transformers (e.g., case conversion), and runtime response parsing via standard-schema libraries. Unlike bare fetch, it offers type-safe response.json() (defaults to unknown instead of any), merges headers, and includes debugging via trace function. Requires Node >=18.
npm install make-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a service with base URL and headers, makes a GET request with params and query, then parses the response with or without Zod schema.
Update calls from makeService(baseURL, headers, options) to makeService(baseURL, { headers, ...options }).Use typedResponse instead.
Pass a validation schema to response.json(schema) or use 'as' type assertion.
Provide transformRequest and transformResponse options explicitly.
Ensure Node.js version is 18 or higher.
Use import { makeService } from 'make-service' and ensure your environment supports ES modules.Run 'npm install make-service' and verify the import statement.
Use service.get() which returns a typedResponse, not bare fetch.
Call response.json() only once; clone the response if you need multiple reads.
No dependency data recorded yet.