Add Missing API HttpResponse.HeadersWritten
Clounea opened this issue · 3 comments
Summary
Our repo uses HttpResponse.HeadersWritten
which is not supported by ASP.NetCore and this adapters.
I want to ask if there is equivalent and if there is plan to add them to adapter.
Motivation and goals
We need migrate code (an API in Sharepoint) to ASP.NetCore and we find that the APIs are not supported by ASP.NetCore.
In scope
HttpResponse.HeadersWritten
I think Microsoft.AspNetCore.Http.HttpResponse.HasStarted
Could implement it.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.httpresponse.hasstarted?view=aspnetcore-8.0#Microsoft_AspNetCore_Http_HttpResponse_HasStarted
https://stackoverflow.com/questions/55119289/response-headerswritten-in-asp-net-core-2
Examples
// if headers is sent, can't proxy
bool canProxy = !context.Response.HeadersWritten;
Using HttpResponse.HasStarted
seems reasonable to me. @Tratcher any thoughts?
Yes, those seem to map.
@Clounea happy to take a PR for this