We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What are the exact requirements for writing a custom middleware as a class?
RequestDelegate
Invoke
InvokeAsync
Task
HttpContext
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered:
I agree. That should be explained in the first section.
Sorry, something went wrong.
This brings up an interesting point: Should there be an interface for implementing middleware?
There is already the interface IMiddleware. But you are not required to use it.
IMiddleware
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/extensibility?view=aspnetcore-2.2
I've created a request for it: #34730
You should be inclined to use the interface, im my opinion. The old way should start to be getting deprecated.
Successfully merging a pull request may close this issue.
What are the exact requirements for writing a custom middleware as a class?
RequestDelegate
Invoke
orInvokeAsync
Task
?HttpContext
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: