Skip to content

feat: Add bulk ZIP export (#867)#222

Open
stephanbuettig wants to merge 1 commit intohttptoolkit:mainfrom
stephanbuettig:feature/zip-export
Open

feat: Add bulk ZIP export (#867)#222
stephanbuettig wants to merge 1 commit intohttptoolkit:mainfrom
stephanbuettig:feature/zip-export

Conversation

@stephanbuettig
Copy link
Copy Markdown

Adds ZIP archive export for HTTP exchanges with 37 code snippet formats via @httptoolkit/httpsnippet. Includes format picker panel, Web Worker generation, and safe filename conventions.

Features:

  • ZIP export with selectable snippet formats (37 languages/clients)
  • Format picker with category grouping and popular defaults
  • Web Worker-based generation for non-blocking UI
  • Safe filename conventions matching existing HAR export pattern

New files: snippet-formats registry, export-filenames utility, download helper, zip-metadata model, zip-download-panel component.

Unit tests for snippet-formats and export-filenames included.

Extracted from #219 as requested by @pimterry.

Adds ZIP archive export for HTTP exchanges with 37 code snippet formats
via @httptoolkit/httpsnippet. Includes format picker panel, Web Worker
generation, and safe filename conventions.

Features:
- ZIP export with selectable snippet formats (37 languages/clients)
- Format picker with category grouping and popular defaults
- Web Worker-based generation for non-blocking UI
- Safe filename conventions matching existing HAR export pattern

New files: snippet-formats registry, export-filenames utility,
download helper, zip-metadata model, zip-download-panel component.

Unit tests for snippet-formats and export-filenames included.

Extracted from httptoolkit#219 as requested by @pimterry.
@stephanbuettig
Copy link
Copy Markdown
Author

✅ Manual Test Results — 2026-04-11

Both features were tested against a fresh clone of current upstream (main, commit 23a99520) using npm start.

ZIP Export (this PR)

All runs completed with 0 snippet errors:

Scenario Formats Snippets Errors Time Size
Single request, all formats 37 37 0 87 ms 67 KB
Single large request, all formats 37 37 0 290 ms 156 KB
Single request, 7 formats 7 7 0 45 ms 8.5 KB

The ZIP download panel opens correctly, format selection persists across sessions, and the generated archives are valid and well-structured.

Batch export (PR #223, depends on this PR)

Scenario Formats Snippets Errors Time Size
13 exchanges, 7 formats 7 91 0 254 ms 152 KB
14 exchanges, all formats 37 518 0 2.1 s 795 KB

Both features are production-ready and work correctly on the current upstream codebase. Ready for review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant