Repository navigation
Conversation
The Headers and Cookies tabs now have a copy button in the tab bar, the same as Request and Response. Headers are copied as key: value lines under each section title. Response cookies are copied as their raw Set-Cookie values and request cookies as a Cookie header value. Cookie values and image metadata are now selectable too. Also fixes calculateHeadersSize, which never joined list values because headers decoded from JSON are List<dynamic>, not List<String>.
3 of 23 tasks
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8190
The Headers and Cookies tabs in the network request inspector had no way to copy their contents, and the cookie table and image metadata weren't selectable at all. This adds a copy button to the tab bar for Headers and Cookies, the same as Request and Response already have, so all the tabs work the same way.
key: valuelines. Multi-value headers are joined the way they'd be sent (set-cookiegets one line per value,cookieis joined with;), so the text can be pasted straight into curl or a bug report.Set-Cookievalues (parsing dropsMax-AgeandSameSite, so the raw header is used when it's there) and request cookies as aCookieheader value.SelectionArea. Selection doesn't work in VS Code on Mac (SelectableText and SelectionArea do not work correctly when calling document.execCommand("copy") unless you right-click flutter#182756), which is why the copy buttons are the main fix here.While in there I also fixed
calculateHeadersSize, used for the HAR export. It checkedvalue is List<String>, but headers decoded from JSON areList<dynamic>, so list values were counted with their brackets. It now shares the same formatting as the copy text.Per-row copy and the request list actions menu mentioned in the issue are left for a follow-up.
Before/after screenshots to come.
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcomeorgood-first-issuelabel.contributions-welcomeorgood-first-issuelabel. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.If you need help, consider asking for help on Discord.