Improve debug logging of Web cmdlet request and response#25479
Merged
iSazonov merged 1 commit intoPowerShell:masterfrom May 1, 2025
Merged
Conversation
iSazonov
reviewed
Apr 29, 2025
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Show resolved
Hide resolved
| try | ||
| { | ||
| //NOTE: Because the request content is directly stringified via HttpResponseMessage, there's no need to do a culture format, it has already been performed. | ||
| WriteDebug(request.ToString()); |
Collaborator
There was a problem hiding this comment.
I suggest to start only with this in the PR and remove all new code below.
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Show resolved
Hide resolved
1221e9f to
580a97b
Compare
d40f1c8 to
d836f7c
Compare
Contributor
Author
|
@iSazonov requested changes implemented. I also added response logging per the original issue specification. |
Collaborator
|
@JustinGrote Please fix CodeFactor issues. |
d836f7c to
fdd1bb7
Compare
Contributor
Author
|
@iSazonov done. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
iSazonov
approved these changes
May 1, 2025
Collaborator
|
@JustinGrote Thanks for your contribution! |
Contributor
Author
|
@iSazonov thanks for your time and patience of the review, I am well aware of the commitment it requires on your side and it is valued and appreciated. I have filed two follow-on issues for the reasonings we discussed in this PR. |
SIRMARGIN
pushed a commit
to SIRMARGIN/PowerShell
that referenced
this pull request
Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR Summary
Log Body when -DebugRequestContent is specifiedPR Context
Closes #23879
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header