-
Notifications
You must be signed in to change notification settings - Fork 60
Add support for request dataType to network data collection #1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for request dataType to network data collection #1011
Conversation
850fc7d
to
1e7d64d
Compare
1e7d64d
to
d5a153f
Compare
index.bs
Outdated
</div> | ||
|
||
<div algorithm> | ||
To <dfn export>clone network request body</dfn> given |request|: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd propose to use typed arguments for externally used hooks: #1004
To <dfn export>clone network request body</dfn> given |request|: | |
To <dfn export>clone network request body</dfn> given [=/request=] |request|: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, despite the comment, it is not used externally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory it should be called from fetch, but yes at the moment it's blocked on whatwg/fetch#1540
Alternatively I can rewrite the PR to trigger this algorithm from the beforeRequestSent event handler if you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no you're right, I haven't updated James' PR. Not quite sure how to do that but I can give it a try.
And in theory, WebDriver BiDi before request sent is a bit too late, because other consumers might have read the stream already, so we really need to clone it as soon as possible.
Thanks for the review! I addressed the suggestions to add types. Let me know if you want to switch to an internal trigger for the algorithm for now. I'll discuss internally to make the fetch PR move. |
Fixes #748
clone network request body
(alternatively could be called explicitly from beforeRequestSent for now)maybe collect network data
frommaybe collect network response body
maybe collect network response body
to callmaybe collect network data
maybe collect network request body
called from the beforeRequestSent stepsOtherwise this mostly reuses the logic added for response body collection. Commands do not need to be udpated AFAICT
Preview | Diff