Skip to content

feat(api): add Response.httpVersion() method#39309

Closed
smckee-r7 wants to merge 1 commit into
microsoft:mainfrom
smckee-r7:response-http-version
Closed

feat(api): add Response.httpVersion() method#39309
smckee-r7 wants to merge 1 commit into
microsoft:mainfrom
smckee-r7:response-http-version

Conversation

@smckee-r7

@smckee-r7 smckee-r7 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Adds Response.httpVersion() to get the http version of a given response
Issue: #39310

@smckee-r7

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Comment thread packages/playwright-core/src/server/har/harTracer.ts
Comment thread packages/playwright-core/src/server/har/harTracer.ts

_setHttpVersion(httpVersion: string) {
this._httpVersion = httpVersion;
this._httpVersionPromise.resolve(httpVersion);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called quite late on webkit.

@smckee-r7

smckee-r7 commented Feb 23, 2026

Copy link
Copy Markdown
Contributor Author

@pavelfeldman Thanks for the feedback. I've updated the code, based on your comments above. I've removed direct await in the harTracer event handlers and followed the same pattern used for other promise based response methods (smckee-r7@c4fd245).

This should now be consistent with how serverAddr() & securityDetails() are handled.

Can I open a new PR with these changes, or can this be reopened perhaps? If you still see issues with the changes, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants