Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

How to get at Form Data from HttpRequestData

Open robkeimig opened this issue 2 years ago • 7 comments

This is very similar to #1920.

I am wondering how I can get at the logical form collection for multipart/x-www-url-encoded submissions when working with functions under the isolated worker process model.

Should we be using the same executionContext.BindingContext.BindingData approach for handling this scenario?

I would really like some way to obtain a simple Dictionary<string,string> of form data that I can pass into my business logic. We have this working perfectly with in-process model.

Right now, I am staring down a hand-coded body parser task.

robkeimig avatar Oct 13 '23 14:10 robkeimig

Pls refer this .https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.functions.worker.http.httprequestdata?view=azure-dotnet

bhagyshricompany avatar Oct 17 '23 10:10 bhagyshricompany

Pls refer this .https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.functions.worker.http.httprequestdata?view=azure-dotnet

This does not provide any documentation regarding loading fields from forms, but I think it is irrelevant as far as I am concerned today.

I am additionally seeing a 502 when I actually deploy my function app to Azure (using isolated worker model), without any sort of logging showing up anywhere in application insights, et. al. I don't even know how to describe the issue at this point beyond "it takes 2 minutes to give me a gateway error".

As it stands, we have zero confidence in the isolated worker model. We have in-process v4 functions working perfectly as deployed in Azure actual, so I am going back to that path.

I would be very interested in hearing from the .NET team regarding long term roadmap intentions around isolated vs in-process workers. If you want to get away from in-process, then we are going to have to do a much better job with documentation, etc. I don't understand how we can push out a feature to GA that doesn't even handle form submissions.

robkeimig avatar Oct 17 '23 17:10 robkeimig

@fabiocav pls comment and validate

bhagyshricompany avatar Oct 25 '23 06:10 bhagyshricompany

Any development on this issue?

FrankBurmo avatar Mar 16 '24 20:03 FrankBurmo

I am interested as well. Is anybody looking at this or is there a way of getting to the httpRequest from HttpRequestData ?

adrobson avatar Apr 02 '24 15:04 adrobson

Check this library https://github.com/Http-Multipart-Data-Parser/Http-Multipart-Data-Parser This will allow you to parse the Body from HttpRequestData which is a stream.

xteizer avatar Jun 01 '24 17:06 xteizer

This is also something we need in our solution. Is there any progress made on this? Is it even on the radar? And how come this is (still) not supported as it is in the in-process model, even though we're being pushed into the isolated worker model??

I'd like to not be dependent on a non-microsoft library just to be able to get the Form data

maarten-vermeulen avatar Jul 09 '24 09:07 maarten-vermeulen

Still no updates?

jakoblover avatar Sep 15 '25 08:09 jakoblover