-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
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
Allow HTTP Trigger to bind to both request and poco #273
Comments
+1 !!! |
For reference: Assuming that you are using the HttpRequestMessage to get headers/query parameters and/or for creating the response back. If so, this will achieve what you need:
(then just build a response back rather then using the helpers off HttpRequestMessage) The HttpTrigger will bind the Header and Query dictionaries to the 2 dictionaries in the signature above, which is what we do for what we need. If we need anything more detailed then we just use the main http request object and in the function deserialize the object. |
We need to fix this (and document it so people know about it!). Script + CSX supports it. |
Resolved with #284 |
Script had special logic to allow this for CSX; but VS tooling and direct SDK users didn't have the same logic. Add the httprequest binding logic in the binding. # Conflicts: # src/WebJobs.Extensions.Http/Config/HttpExtensionConfiguration.cs # src/WebJobs.Extensions.Http/GlobalSuppressions.cs # src/WebJobs.Extensions.Http/HttpTriggerAttributeBindingProvider.cs # src/WebJobs.Extensions.Http/WebJobs.Extensions.Http.csproj
btw It still not working with core at the moment (
|
Not working with core 2.2:
CreateRoleDefinition: Microsoft.Azure.WebJobs.Host: Error indexing method 'CreateRoleDefinition'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'req' to type HttpRequestMessage. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.). |
Support this: Azure/Azure-Functions#401
ScriptBinding has some extra binding magic to support this. That should be in the http extension instead so that it works in all cases. It currently does not work in direct SDK cases, which includes Functions VS Tooling.
The text was updated successfully, but these errors were encountered: