An HTTP response is the server message returned for an HTTP request. In ASP.NET Core, HttpResponse represents the response that travels back through the request pipeline, carrying a status code, headers, cookies, and optionally a body. section 12.4
Writing a response from middleware
A middleware component can recognize a GET request with ?custom=true, set a plain-text content type, write a message to the response body, and then continue the pipeline. Setting the content type helps prevent later middleware from trying to supply conflicting response metadata.



