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

Expose HTTP response trailers on RestResponse

Aperta
#2,413 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@Benziza ci sta già lavorando.

Dal 27/9/2026.

  • #2414 di @Benziza — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
9.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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

Tutte le issue di restsharp/RestSharp

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.