Extract curl and HTTPie generation from the form submit handler in app.js into standalone generator functions. Introduce a generator registry (Map<String, Function>) where each key is the display label and each value is a generator function with signature generate({ method, url, headers, body, contentType, schema }) → string.
The form submit handler should call generators[label](params) for all copy-format modes and copy the result to clipboard. The Try mode remains special (sends the actual request).
No new formats, no UX changes. The 3-segment toggle stays as-is.
Part of #11. See spec: docs/superpowers/specs/2026-04-12-issue-11-output-formats-design.md
Extract curl and HTTPie generation from the form submit handler in app.js into standalone generator functions. Introduce a generator registry (
Map<String, Function>) where each key is the display label and each value is a generator function with signaturegenerate({ method, url, headers, body, contentType, schema }) → string.The form submit handler should call
generators[label](params)for all copy-format modes and copy the result to clipboard. The Try mode remains special (sends the actual request).No new formats, no UX changes. The 3-segment toggle stays as-is.
Part of #11. See spec:
docs/superpowers/specs/2026-04-12-issue-11-output-formats-design.md