A JavaScript library that simplifies making HTTP requests with Wretch, featuring cURL generation, verbose output, and colorful JSON formatting for easier debugging.
pnpm add jsr:@yym/reqscript
or
npx jsr add @yym/reqscript
Create a file named example.ts
:
// example.ts
import { createRequest } from "@yym/reqscript";
createRequest((w) => w.get("https://nekos.best/api/v2/neko"));
Run the script:
node ./example.ts
To get detailed information, including the cURL command and response details, use the --verbose
flag:
node ./example.ts --verbose
MIT