FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

inspector: add protocol methods retrieving sent/received data by legendecas · Pull Request #58645 · nodejs/node · GitHub

/ node Public

inspector: add protocol methods retrieving sent/received data - #58645

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:inspector/data-sent-api
Jun 20, 2025
Merged

inspector: add protocol methods retrieving sent/received data#58645
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:inspector/data-sent-api

Conversation

Copy link
Copy Markdown
Member

Add protocol method Network.dataSent to buffer request data. And
expose protocol methods Network.getRequestPostData and
Network.getResponseBody allowing devtool to retrieve buffered data.

nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 9, 2025
Add protocol method `Network.dataSent` to buffer request data. And
expose protocol methods `Network.getRequestPostData` and
`Network.getResponseBody` allowing devtool to retrieve buffered data.
legendecas force-pushed the inspector/data-sent-api branch from 0d15711 to 5b2f8a5 Compare June 9, 2025 11:56
legendecas added the inspector Issues and PRs related to the V8 inspector protocol label Jun 9, 2025

codecov Bot commented Jun 9, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 80.12048% with 33 lines in your changes missing coverage. Please review.

Project coverage is 90.15%. Comparing base (b23648e) to head (5b2f8a5).
Report is 64 commits behind head on main.

Files with missing lines Patch % Lines
src/inspector/network_agent.cc 68.31% 16 Missing and 16 partials ⚠️
lib/internal/inspector/network.js 95.23% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #58645    +/-   ##
========================================
  Coverage   90.15%   90.15%            
========================================
  Files         636      637     +1     
  Lines      187891   188001   +110     
  Branches    36879    36899    +20     
========================================
+ Hits       169386   169493   +107     
+ Misses      11272    11245    -27     
- Partials     7233     7263    +30     
Files with missing lines Coverage Δ
lib/inspector.js 96.94% <100.00%> (+0.01%) ⬆️
lib/internal/inspector/network_http.js 95.23% <100.00%> (+0.68%) ⬆️
lib/internal/inspector/network_undici.js 94.40% <100.00%> (+0.65%) ⬆️
src/inspector/network_agent.h 100.00% <100.00%> (ø)
lib/internal/inspector/network.js 94.66% <95.23%> (+0.22%) ⬆️
src/inspector/network_agent.cc 63.47% <68.31%> (-0.31%) ⬇️

... and 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member Author

@nodejs/inspector would you mind taking a look? Thank you!

Copy link
Copy Markdown
Collaborator

legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 20, 2025
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 20, 2025
nodejs-github-bot merged commit 5a14ea6 into nodejs:main Jun 20, 2025

Copy link
Copy Markdown
Collaborator

Landed in 5a14ea6

legendecas deleted the inspector/data-sent-api branch June 20, 2025 10:34
RafaelGSS pushed a commit that referenced this pull request Jun 23, 2025
Add protocol method `Network.dataSent` to buffer request data. And
expose protocol methods `Network.getRequestPostData` and
`Network.getResponseBody` allowing devtool to retrieve buffered data.

PR-URL: #58645
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2025
Add protocol method `Network.dataSent` to buffer request data. And
expose protocol methods `Network.getRequestPostData` and
`Network.getResponseBody` allowing devtool to retrieve buffered data.

PR-URL: #58645
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 24, 2025
Add protocol method `Network.dataSent` to buffer request data. And
expose protocol methods `Network.getRequestPostData` and
`Network.getResponseBody` allowing devtool to retrieve buffered data.

PR-URL: #58645
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>

capJavert commented Jan 22, 2026
edited
Loading

Copy link
Copy Markdown

@legendecas sorry for tagging, but I have a question, from my usage looks like this implementation covers Network.getResponseBody on raw text response, but if body is compressed (eg. gzip, br) it shows like this in Node.js inspector network tab:

From my understanding we could hook into auto decompress option in http client and then use that depending on conent-encoding in getResponseBody.

Just trying to figure out if this is intended or missed?

Copy link
Copy Markdown
Member Author

@capJavert yes, there is a PR #61226 for this issue.

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

Labels

inspector Issues and PRs related to the V8 inspector protocol lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL