Megan A Thanks for posting your question in Microsoft Q&A. Currently, in Isolated model, you must use HttpRequestData and HttpResponseData to access the request and response data and HttpRequest
& HttpResponse
objects are not accessible in Isolated model. Check doc https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide#bindings which describes about this, and HTTP trigger provides info about the translation of HttpRequest
to HttpRequestData
.
To answer your second question, we have opened up an epic discussion page HTTP model enhancements which talks about why we took this approach instead of providing implementations of HttpRequest
and HttpResponse
and a new HTTP model/flow to move towards HttpRequest
to overcome the limitations. But please note that this is still under discussion (No ETA) and feel free to share your thoughts/use case in that thread or repo.
If you have code that extends DelegatingHandler and requires the HttpRequestMessage object, you can still use it in the in-process model of Azure Functions (instead of Isolated Model). I hope this helps with your questions and let me know if you have any other.
If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.