Document the new `Query` value for the `-Method` parameter of Invoke-WebRequest and Invoke-RestMethod
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 86/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- powershell
- Ambito
- documentation
Direzione di ricerca
Inizia con reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md e Invoke-RestMethod.md, leggendo le sezioni relative al parametro -Method e gli esempi vicini. Aggiungi Query ai valori validi e documenta il comportamento del corpo della richiesta con esempi appropriati, quindi verifica che entrambi gli articoli seguano le convenzioni di documentazione del repository e vengano visualizzati correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foocmdlet" instead of "New cmdlet."
Summary
PowerShell is adding support for the standard HTTP QUERY method to Invoke-WebRequest and Invoke-RestMethod. A new Query value has been added to the WebRequestMethod enum (the valid set for the -Method parameter), implemented on top of .NET 10's new System.Net.Http.HttpMethod.Query API.
Details
The QUERY method is a safe, idempotent method defined by the IETF that is like GET, but sends its payload in the request body instead of the URI. This allows large or structured search/query parameters to be submitted without URI length limits. For more information, see the HTTP QUERY method (IETF) and MDN: HTTP QUERY method.
Articles
- Invoke-WebRequest (
reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md) - Invoke-RestMethod (
reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md)
Suggested updates:
- Add
Queryto the-Methodparameter description and the list of valid values. - Add one or two examples (see below).
Suggested content
Parameter description for -Method:
Specifies the HTTP method used for the request.
QUERYsends a safe, idempotent request whose parameters are carried in the request body rather than the URI. When-Bodyis a hashtable, it is sent as the request content (not converted into URI query parameters as withGET).
Example:
Invoke-RestMethod -Uri 'https://api.example.com/search' -Method Query `
-Body @{ q = 'powershell'; limit = 10 } `
-ContentType 'application/x-www-form-urlencoded'
Example:
$body = @{ query = 'SELECT * FROM events'; from = '2026-01-01' } | ConvertTo-Json
Invoke-WebRequest -Uri 'https://api.example.com/sql' -Method Query -Body $body -ContentType 'application/json'
Related Source Pull Requests
Related Source Issues
- Lingua principale
- PowerShell
- Stelle
- 2.5k
- Fork
- 1.7k
- Merge medio
- 6h 43m
- PR unite (30g)
- 34
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MicrosoftDocs/PowerShell-Docs
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
MicrosoftDocs/PowerShell-Docs#13305 ·
I maintainer di solito rispondono entro 1 giorno
-
hold-for-pr hold-for-release issue-doc-idea
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MicrosoftDocs/PowerShell-Docs#13195 ·
I maintainer di solito rispondono entro 1 giorno
-
hold-for-pr hold-for-release
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
MicrosoftDocs/PowerShell-Docs#12897 ·
I maintainer di solito rispondono entro 1 giorno
-
Add "Avoid function / scriptblock based recursion" section to `Performance Considerations` documentApertaarea-sdk-docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MicrosoftDocs/PowerShell-Docs#11037 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
hold-for-pr hold-for-release
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
MicrosoftDocs/PowerShell-Docs#13172 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MicrosoftDocs/PowerShell-Docs
Issue simili
-
Docs: "Work with Codex from anywhere" page still claims Windows mobile support is "coming soon"Apertaapp documentation remote windows-os
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
librepods-org/librepods#802 ·
I maintainer di solito rispondono entro 1 giorno
-
area:lint-tooling found-by:critic kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
InauguralSystems/EigenScript#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
I maintainer di solito rispondono entro 1 giorno
-
technical-improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni