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

Expose HTTP response trailers on RestResponse

Đang mở
#2,413 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Từ ngày 27/9/2026.

  • #2414 của @Benziza — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
api, backend-api-design

Hướng nghiên cứu

Start by locating RestResponseBase and the execution path that consumes HttpResponseMessage content. Check target-framework differences around HttpResponseMessage.TrailingHeaders, then review existing response-header tests. Done means exposing a separate TrailingHeaders collection, populating it after body completion where supported, leaving it empty elsewhere, and verifying trailers remain separate from regular headers.

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

Mô tả

Problem

.NET exposes HTTP response trailer fields through HttpResponseMessage.TrailingHeaders, but RestSharp currently maps only the regular response headers and content headers to RestResponse. The internal HttpResponseMessage is disposed after execution, so callers using the standard ExecuteAsync path cannot access trailer fields.

Trailer fields are useful for message integrity checks, signatures, delivery metrics, and post-processing status information. RFC 9110 also recommends storing them separately from the initial header section.

Proposed change

  • Add a TrailingHeaders collection to RestResponseBase, separate from Headers and ContentHeaders.
  • Populate it after the response body has been fully consumed, because .NET exposes received trailers only after content completion.
  • Keep the collection empty on target frameworks where HttpResponseMessage.TrailingHeaders is unavailable.
  • Add tests verifying that trailers are preserved and remain separate from regular headers.

Compatibility

This would be an additive public API change. RestSharp targets
etstandard2.0, .NET Framework, and modern .NET, so the property can be available on all targets while population is guarded for supported modern .NET targets.

Ngôn ngữ chính
C#
Star
9.8k
Fork
2.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 restsharp/RestSharp

Tất cả issue của restsharp/RestSharp

Issue tương tự

Thêm issue về C#

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.