-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat(api): add Request.existingResponse() method #39077
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
feat(api): add Request.existingResponse() method #39077
Conversation
Add a synchronous method to get the response object if it has already been received, without waiting. Returns null if the response hasn't arrived yet.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
72f3b01 to
e887e0b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"1 failed 3819 passed, 145 skipped Merge workflow run. |
| this._browserContextDispatcher = scope; | ||
| this.addObjectListener(Request.Events.Response, () => this._dispatchEvent('response', {})); | ||
| // Push existing response to the client if it exists. | ||
| ResponseDispatcher.fromNullable(scope, request._existingResponse()); |
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.
This will create a state where for a request with the response on the server side, response-less request will be created on the client.
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.
Sounds like hasResponse is the only way to make it work w/o fixing channels.
Test results for "tests 1"2 failed 5 flaky34270 passed, 662 skipped Merge workflow run. |
Add a synchronous method to get the response object if it has already been received, without waiting. Returns null if the response hasn't arrived yet.