Skip to content

Guidelines about HttpResponse.BodyWriter #35288

@verdie-g

Description

@verdie-g

There are currently two ways to write to the response body: HttpResponse.Body and HttpResponse.BodyWriter (ASP.NET 3+).

It would be great to document:

  • when one should be used over the other
  • can writes be interleaved between the two (one write to Body then one write to BodyWriter)
  • should PipeWriter.FlushAsync be called manually
  • how to write middleware supporting both (e.g. compression middleware)

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 423877

Metadata

Metadata

Assignees

Labels

seQUESTeredIdentifies that an issue has been imported into Quest.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions