Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Document the new `Query` value for the `-Method` parameter of Invoke-WebRequest and Invoke-RestMethod

Aperta Adatta ai principianti
#13,306 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

issue-doc-idea needs-triage
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-Foo cmdlet" 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

Suggested updates:

  1. Add Query to the -Method parameter description and the list of valid values.
  2. Add one or two examples (see below).
Suggested content

Parameter description for -Method:

Specifies the HTTP method used for the request. QUERY sends a safe, idempotent request whose parameters are carried in the request body rather than the URI. When -Body is a hashtable, it is sent as the request content (not converted into URI query parameters as with GET).

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MicrosoftDocs/PowerShell-Docs

Tutte le issue di MicrosoftDocs/PowerShell-Docs

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.