8 lines
463 B
Markdown
8 lines
463 B
Markdown
|
Reset allows for the server to reset a HTTP/2 request with a specified error code. A reset request is considered aborted.
|
||
|
|
||
|
```csharp
|
||
|
var resetFeature = httpContext.Features.Get<IHttpResetFeature>();
|
||
|
resetFeature.Reset(errorCode: 2);
|
||
|
```
|
||
|
|
||
|
`Reset` in the preceding code example specifies the `INTERNAL_ERROR` error code. For more information about HTTP/2 error codes, visit the [HTTP/2 specification error code section](https://tools.ietf.org/html/rfc7540#page-50).
|