Added opt-in “Format” toggle for HttpMessage Copy/Edit + tests by nadav96 · Pull Request #8039 · mitmproxy/mitmproxy
added 4 commits
January 4, 2026 19:47…shots - Add a Format/Formatted toggle so Copy/Edit can use the selected content view’s prettified output while keeping the displayed payload unchanged. - Edit mode now loads either raw content.data (default) or prettified content view output (when enabled), including syntax highlighting. - Update HttpMessage Jest mocks and snapshots for the new button and fetch paths.
- Add setClipboardMocks() helper to mock navigator.clipboard in tests - Test Format button toggles between "Format" and "Formatted" labels - Verify Copy uses raw content.data when Format is off - Verify Copy uses prettified content view JSON when Format is on - Verify Edit fetches prettified content view when Format is on - Check correct fetch URLs are called for raw vs formatted content paths
nadav96
changed the title
Copy attempt
Added opt-in “Format” toggle for HttpMessage Copy/Edit + tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters