A lightweight package (v0.0.3) that provides an Axios interceptor to generate cURL commands from Axios HTTP requests. It helps in debugging by converting Axios request configuration to equivalent cURL strings. The library ships TypeScript definitions and requires Axios ^1.6.7 as a peer dependency. Useful for developers wanting to replicate or debug Axios requests via cURL.
npm install curl2axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate CurlInterceptor on an Axios instance, enable it, and make a request. The cURL for that request is logged.
Call interceptor.enable() before making any request you want to convert.
Pin to exact version or stay updated with changelog.
Override console.log or fork the library to capture output.
Ensure you import axios correctly: import axios from 'axios' (ESM) or const axios = require('axios') (CJS).Use: new CurlInterceptor(axiosInstance) or check that you imported CurlInterceptor correctly: import { CurlInterceptor } from 'curl2axios'.Ensure interceptor is instantiated: const interceptor = new CurlInterceptor(axiosInstance);