Skip to content

[Feature]: Response http version #39310

@smckee-r7

Description

@smckee-r7

🚀 Feature Request

Having a way to get the http version of a given response would be nice to have. Currently the only way to get this information is by enabling HAR recording and pulling it from there. I've created a PR to add this: #39309

Example

const response = await page.goto("https://example.com");
const httpVersion = await response.httpVersion(); // returns string HTTP/1.1, HTTP/2.0, etc

Motivation

The Response object already exposes useful network level data via serverAddr() and securityDetails() but provides no way of accessing the http version of a given response without enabling the HAR recording and processing the entire HAR file after the context is closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions