Add QUERY method support for Invoke-WebRequest - #28110
soroshsabz wants to merge 3 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Implementation and test coverage are complete; only a minor documentation follow-up was noted.
Review effort: Lite
Findings: None
What changed in this PR
Adds first-class QUERY method support to PowerShell web cmdlets with integration tests.
Changes:
- Adds
WebRequestMethod.Query. - Maps it to
.NET HttpMethod.Query. - Adds WebListener routes and cmdlet tests.
| File | Description |
|---|---|
test/tools/WebListener/Startup.cs |
Adds a QUERY test route. |
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 |
Tests QUERY behavior and request bodies. |
src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/WebRequestMethod.cs |
Adds the Query enum value. |
src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs |
Maps Query to HttpMethod.Query. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
A note to Cmdlet WG for review: PowerShell already supports sending The enum-backed methods are a curated list of methods. It contains |
|
Dongbo Wang (@daxian-dbw) what is workflow for review? |
|
soroshsabz this PR is marked for the Cmdlets Group to review. Please wait for us to get back to you. Also we hadn't yet discussed the issue this PR is to resolve so we have not yet made a recommendation on how or if it needs fixed. I suggest in future looking for issues that are labeled as |
ITNOA
PR Summary
Add QUERY method support for
Invoke-RestMethodorInvoke-WebRequest.PR Context
This PR fixes #28061
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerQueryvalue for the-Methodparameter of Invoke-WebRequest and Invoke-RestMethod MicrosoftDocs/PowerShell-Docs#13306