Convert fetch HTTP request parameters to a cURL command string. Stable v1.0.2 (last release unknown) with TypeScript type definitions included. A fork of leoek/fetch-to-curl with enhanced TypeScript support and improved payload serialization (handles FormData, JSON, text, etc.). Differentiators: type-safe, streams handling, and supports React Native. Dependency on @types/node only for Node.js usage.
npm install fetch-to-curl-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates converting a GET fetch request with a header into a curl command string.
Update imports to 'fetch-to-curl-ts'.
Use await or .then() when calling fetchToCurl.
Use const { fetchToCurl } = require('fetch-to-curl-ts').Run npm install --save-dev @types/node if using TypeScript in Node environment.
Use `import { fetchToCurl } from 'fetch-to-curl-ts'`.Run `npm install fetch-to-curl-ts` and check spelling.
Use named import: `import { fetchToCurl } from 'fetch-to-curl-ts'`.