Expose HTTP response trailers on RestResponse
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
- Domínio
- api, backend-api-design
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
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de restsharp/RestSharp
-
RestClientOptions.UserAgent missing from requests with useClientFactory: trueTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
feature-request
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
-
Default AutomaticDecompression = All routes responses through the Brotli decoder affected by CVE-2026-111497Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
feature-request rfc
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Todas as issues de restsharp/RestSharp
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
possible bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
-
Include host.wslc.internal in the HTTPS development certificateTalvez já em andamento @afscrome assumiu hoje. Abertaarea-commandlinetools
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
dotnet/aspnetcore#70122 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
:1st_place_medal: good first issue :cowboy_hat_face: refactor :roller_coaster: enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ApplETS/Backend-Hello#78 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 2 dias