Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Expose HTTP response trailers on RestResponse

Fechada
#2,413 0 comentários 0 reações 0 responsáveis Ver no GitHub

@Benziza já está trabalhando nisso.

Desde 27/9/2026.

  • #2414 de @Benziza — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
68/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
9.8k
Forks
2.3k
Merge médio
20min
PRs com merge (30d)
1

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de restsharp/RestSharp

Todas as issues de restsharp/RestSharp

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.