{"id":49895003,"url":"https://github.com/voidd0/httpwut","last_synced_at":"2026-05-15T23:01:48.217Z","repository":{"id":353200378,"uuid":"1218339639","full_name":"voidd0/httpwut","owner":"voidd0","description":"explain any HTTP status code or header in one command. cited to the RFC.","archived":false,"fork":false,"pushed_at":"2026-04-29T06:14:28.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T20:46:19.005Z","etag":null,"topics":["cli","devtools","http-headers","http-status-codes","javascript","nodejs","rfc"],"latest_commit_sha":null,"homepage":"https://tools.voiddo.com/httpwut/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidd0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T19:22:14.000Z","updated_at":"2026-04-29T06:14:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/voidd0/httpwut","commit_stats":null,"previous_names":["voidd0/httpwut"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/voidd0/httpwut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fhttpwut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fhttpwut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fhttpwut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fhttpwut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidd0","download_url":"https://codeload.github.com/voidd0/httpwut/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fhttpwut/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33082699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","devtools","http-headers","http-status-codes","javascript","nodejs","rfc"],"created_at":"2026-05-15T23:01:12.326Z","updated_at":"2026-05-15T23:01:48.208Z","avatar_url":"https://github.com/voidd0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httpwut\n\n[![npm version](https://img.shields.io/npm/v/@v0idd0/httpwut.svg?color=A0573A)](https://www.npmjs.com/package/@v0idd0/httpwut)\n[![npm downloads](https://img.shields.io/npm/dw/@v0idd0/httpwut.svg?color=1F1A14)](https://www.npmjs.com/package/@v0idd0/httpwut)\n[![License: MIT](https://img.shields.io/badge/license-MIT-A0573A.svg)](LICENSE)\n[![Node ≥14](https://img.shields.io/badge/node-%E2%89%A514-1F1A14)](package.json)\n\n**HTTP request debugger for humans.** \"Why isn't my request working?\" — this tool answers that, loud and specific, in under a second.\n\nFree forever gift from [vøiddo](https://voiddo.com).\n\n```\n┌───────────────────────────────────────┐\n│  httpwut https://api.example.com      │\n│                                       │\n│  STATUS   401 Unauthorized ✗          │\n│  bruh. unauthorized. missing or bad   │\n│  auth credentials.                    │\n│                                       │\n│  TIMING                               │\n│  DNS   ███░░░░░░░░░░░░░░░   14ms     │\n│  TCP   █░░░░░░░░░░░░░░░░░    4ms     │\n│  TLS   ████░░░░░░░░░░░░░░   19ms     │\n│  TTFB  ██████████████░░░░   78ms     │\n│  Total                      124ms     │\n└───────────────────────────────────────┘\n```\n\n## Why httpwut\n\nYou fire a request. Something's off. `curl -v` dumps a wall of text, Postman hides the timing, Insomnia needs a GUI. You just want to know **what actually happened on the wire** — DNS, TCP, TLS, TTFB, each phase measured, redirects walked, headers diffed, status explained in plain English (and, ok, a little \"bruh\").\n\nhttpwut is that. One binary. Zero config. Works in SSH sessions, CI logs, and Docker containers without pulling a thousand dependencies.\n\n## Install\n\n```bash\nnpm install -g @v0idd0/httpwut\n```\n\nOr run it ad-hoc with `npx`:\n\n```bash\nnpx -y @v0idd0/httpwut https://api.github.com/users/octocat\n```\n\n## Quickstart\n\n```bash\n# Simple GET with full debug info\nhttpwut https://api.github.com/users/octocat\n\n# POST with JSON body\nhttpwut https://api.example.com/orders -X POST -d '{\"sku\":\"abc\",\"qty\":1}'\n\n# Bearer token + query params\nhttpwut https://api.example.com/users --bearer \"$TOKEN\" --query limit=10 --query page=2\n\n# Basic auth\nhttpwut https://api.example.com -u admin:hunter2\n\n# Body from file (or '-' for stdin)\nhttpwut https://api.example.com/ingest -X POST --data-file @./payload.json\ncat payload.json | httpwut https://api.example.com/ingest -X POST --data-file -\n\n# Follow redirects and print the chain\nhttpwut https://voiddo.com -L\n\n# Full phase-timing breakdown\nhttpwut https://api.example.com --timing\n\n# Retry on transient 5xx\nhttpwut https://api.example.com --retry 3 --retry-delay 500 --retry-on-status 502,503,504\n\n# Compare two endpoints\nhttpwut https://api.example.com/v1/users --compare https://api.example.com/v2/users\n\n# Status-only mode (exit code maps to 2xx / non-2xx, no output chrome)\nhttpwut https://api.example.com --status-only\n\n# Machine-readable JSON envelope for scripts\nhttpwut https://api.example.com --json | jq .status\n\n# Print the equivalent curl command (no request is made)\nhttpwut https://api.example.com --bearer \"$TOKEN\" --curl\n```\n\n## Options\n\n### Request\n| Option | Description |\n|--------|-------------|\n| `-X, --method \u003cmethod\u003e` | HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) |\n| `-H, --header \u003cheader\u003e` | Add header (can use multiple times) |\n| `-d, --data \u003cdata\u003e` | Request body (inline) |\n| `--data-file \u003cpath\u003e` | Read request body from file (use `-` for stdin) |\n| `--query \u003ck=v\u003e` | Append a query param (can use multiple times) |\n| `--bearer \u003ctoken\u003e` | Shortcut for `Authorization: Bearer \u003ctoken\u003e` |\n| `-u, --user \u003cuser:pass\u003e` | Basic auth shortcut |\n\n### Output\n| Option | Description |\n|--------|-------------|\n| `-o, --output \u003cfile\u003e` | Save response body to file |\n| `--json` | Emit a single machine-readable JSON envelope |\n| `--curl` | Print equivalent `curl` command (no request made) |\n| `-v, --verbose` | Show everything (full headers, full body, timing) |\n| `--headers-only` | Show only response headers |\n| `--body-only` | Show only response body (raw, no chrome) |\n| `--status-only` | Show only status code, exit 0 on 2xx / 1 otherwise |\n| `--timing` | DNS / TCP / TLS / Wait / TTFB / Download breakdown |\n\n### Behavior\n| Option | Description |\n|--------|-------------|\n| `-e, --expect \u003ccodes\u003e` | Expected status codes, comma-separated |\n| `-L, --follow` | Follow redirects (prints the chain) |\n| `--compare \u003curl\u003e` | Diff headers / body / timing against another endpoint |\n| `--insecure` | Skip SSL verification |\n| `--timeout \u003cms\u003e` | Request timeout (default 30000) |\n| `--retry \u003cn\u003e` | Retry on network errors up to N times |\n| `--retry-delay \u003cms\u003e` | Base delay between retries, linear backoff |\n| `--retry-on-status \u003ccodes\u003e` | Also retry on these status codes (e.g. `502,503,504`) |\n\n## Features\n\n### Phase-timing breakdown\nhttpwut measures each phase from the Node socket lifecycle — DNS lookup, TCP connect, TLS handshake, server wait, TTFB, and download — and prints them as stacked bars. No wrapping `curl --trace-ascii`, no guessing which phase is slow.\n\n### Human-readable errors\nEvery `ECONNREFUSED`, `ENOTFOUND`, `EAI_AGAIN`, `CERT_HAS_EXPIRED`, `ERR_TLS_CERT_ALTNAME_INVALID`, `SELF_SIGNED_CERT_IN_CHAIN` is translated. No more googling cryptic Node error codes.\n\n### Status code cheat-sheet built in\nEvery 4xx and 5xx gets a one-liner in plain English. Includes modern codes most curl wrappers ignore: 418, 422, 425, 426, 429, 451, 511, 507, 508.\n\n### Endpoint diff\n`--compare \u003curl\u003e` fires two requests, diffs status + every header + body + timing. Great for A/B testing load balancers, canary deploys, and \"is this proxy actually transparent?\"\n\n### Redirect chain walker\n`--follow` hops up to 10 redirects and prints every step with status, URL, and color coding.\n\n### JSON envelope\n`--json` emits a single JSON object with `ok / url / status / headers / body / timing / redirectChain / statusHelp` — drop it straight into `jq`, GitHub Actions matrices, or `uptime` scripts.\n\n### `curl` emitter\n`--curl` prints the exact `curl` command that would produce the same request — method, headers, body, `-k`, all of it — without actually firing. Perfect for pasting into bug reports.\n\n### Retries with backoff\n`--retry 3 --retry-on-status 502,503,504` retries on network errors and configurable status codes with linear backoff. Reports `(after N attempts)` in the final status block so you know it wasn't a first-shot win.\n\n## Exit codes\n\n| Code | Meaning |\n|------|---------|\n| `0`  | Response status is 2xx |\n| `1`  | Response status is non-2xx OR the request itself failed |\n| `2`  | Invalid flags (e.g. both `--data` and `--data-file`) |\n\n## Programmatic use\n\n```js\nconst { makeRequestWithRetries, getStatusHelp } = require('@v0idd0/httpwut/src/requester');\n\nconst res = await makeRequestWithRetries('https://api.example.com/ping', {\n  method: 'GET',\n  timeout: 5000,\n  retries: 2,\n  retryDelay: 300,\n  retryOnStatus: [502, 503, 504],\n});\n\nconsole.log(res.status, getStatusHelp(res.status), res.timing);\n```\n\nExports: `makeRequest`, `makeRequestWithRetries`, `followRedirects`, `parseHeaders`, `getErrorHelp`, `getStatusHelp`, `isSuccess`, `formatJson`, `truncate`, `compareResponses`, `toCurl`, `buildUrl`, `ERROR_HELP`, `STATUS_HELP`.\n\n## From the same studio\n\nvøiddo builds sharp, free-forever CLIs for devs who are tired of paywalls:\n\n- [`@v0idd0/jsonyo`](https://voiddo.com/tools/jsonyo/) — JSON that yells at you when it's broken\n- [`@v0idd0/tokcount`](https://voiddo.com/tools/tokcount/) — token counter for 60+ LLMs (GPT-5.4, Claude Opus 4.7, Gemini 3.1, Llama 4, Grok 4.1)\n- [`@v0idd0/ctxstuff`](https://voiddo.com/tools/ctxstuff/) — stuff a repo into an LLM context window without the OOM\n- [`@v0idd0/promptdiff`](https://voiddo.com/tools/promptdiff/) — diff two prompts, see token impact + word-frequency delta\n\nFull catalog: [voiddo.com/tools](https://voiddo.com/tools/).\n\n## License\n\nMIT © [vøiddo](https://voiddo.com) — free forever, no asterisks.\n\n## Links\n\n- Docs: https://voiddo.com/tools/httpwut/\n- Source: https://github.com/voidd0/httpwut\n- npm: https://npmjs.com/package/@v0idd0/httpwut\n- Studio: https://voiddo.com\n- Issues: https://github.com/voidd0/httpwut/issues\n- Support: support@voiddo.com\n\n---\n\nBuilt by [vøiddo](https://voiddo.com/) — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Fhttpwut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidd0%2Fhttpwut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Fhttpwut/lists"}