dotnet / dotnet/aspnetcore

Unit testing HttpContext with HTTP2 features

Open
#6,871 7 comments 0 reactions 0 assignees View on GitHub
affected-medium area-networking enhancement feature-http-abstractions HTTP2 severity-minor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

Is there a simple way to create a HttpContext with HTTP2 features? I want to write some HTTP2-ish unit tests.

```cs
var context = new DefaultHttpContext();
context.Response.AppendTrailers("", "");
```

This throws an error because there is no `IHttpResponseTrailersFeature`.

Is there a simple way to make the context HTTP2-erized. If not, consider adding one.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.