Improve verbose and debug logging level messaging in web cmdlets by JustinGrote · Pull Request #25510 · PowerShell/PowerShell

@JustinGrote marked this pull request as draft

May 5, 2025 16:29

@JustinGrote JustinGrote changed the title WebRequest Cmdlets: Improve Verbose and Debug Logging Levels and include Request Content WebRequest Cmdlets: Improve Verbose and Debug Logging Level Messaging

May 5, 2025

iSazonov

@iSazonov iSazonov added the CL-General

Indicates that a PR should be marked as a general cmdlet change in the Change Log

label

May 7, 2025

iSazonov

iSazonov

iSazonov

iSazonov

All retries are done with recursive GetResponse added by PowerShell#19229.

The do loop was a leftover from the old way of doing things, it never actually gets triggered, and redirects previously had internal GetResponse that bypassed it, but when I unified the logic to unify the verbose messages, it now follows the flow "properly" and got stuck in the do/while instead of return the response, causing it to reuse the request and trigger an exception.
Fixes test "Invoke-WebRequest -PassThru -OutFile -Verbose File Name reflects the downloaded file name"

@JustinGrote

@JustinGrote

@JustinGrote

iSazonov

iSazonov

iSazonov

iSazonov

@iSazonov iSazonov changed the title WebRequest Cmdlets: Improve Verbose and Debug Logging Level Messaging Improve verbose and debug logging level messaging in web cmdlets

Jun 11, 2025

SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request

Dec 12, 2025

@JustinGrote @SIRMARGIN