Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#13,306 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@soroshsabz đang làm issue này rồi.

Từ ngày 25/9/2026.

  • #13307 của @soroshsabz — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
86/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
powershell
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md và Invoke-RestMethod.md, đọc các phần về tham số -Method và các ví dụ lân cận. Thêm Query vào các giá trị hợp lệ và ghi lại hành vi của request body bằng các ví dụ phù hợp, sau đó xác minh rằng cả hai bài viết đều tuân theo các quy ước tài liệu của repository và được render chính xác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

hold-for-pr hold-for-release 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
Ngôn ngữ chính
PowerShell
Star
2.6k
Fork
1.7k
Merge trung bình
4 giờ 11 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MicrosoftDocs/PowerShell-Docs

Tất cả issue của MicrosoftDocs/PowerShell-Docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.