Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invoke-WebRequest / Invoke-RestMethod -Verbose shows requested rather than actual version #19615

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Prerequisites

Steps to reproduce

Note:

  • Perhaps the behavior is by design: show what version was requested.
  • However, at least the actual HTTP version used is also worth knowing.
 ((Invoke-WebRequest https://example.org -Verbose -HttpVersion 3).RawContent -split '\r?\n', 2)[0]

Expected behavior

VERBOSE: HTTP/2.0 GET with 0-byte payload
VERBOSE: received response of content type text/html of unknown size
HTTP/2.0 200 OK

Actual behavior

VERBOSE: HTTP/3.0 GET with 0-byte payload
VERBOSE: received response of content type text/html of unknown size
HTTP/2.0 200 OK

That is, even though the actual HTTP version is 2.0, the -Verbose output shows the requested version.

Error details

No response

Environment data

PowerShell 7.4.0-preview.3

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.