Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.93k stars 441 forks source link

Access request/response body in overrides #1968

Open alexkarcher-msft opened 7 years ago

alexkarcher-msft commented 7 years ago

As a part of first-class JSON support, we should add the ability for Proxies to override specific parts of the request/response body. The current behavior is and all or nothing override of the body.

alexkarcher-msft commented 6 years ago

Linking this up to a uservoice item. Notable that we don't have support to override the request body at all. https://feedback.azure.com/forums/355860-azure-functions/suggestions/32948629-proxies-should-support-backend-request-body-expres

anthonychu commented 6 years ago

Public link to uservoice item: https://feedback.azure.com/forums/355860-azure-functions/suggestions/32948629-proxies-should-support-backend-request-body-expres

alexkarcher-msft commented 6 years ago

Thanks @anthonychu ! You're the glue holding this community together!

CharlieDigital commented 3 years ago

Hi, chiming in on this old issue.

I have recently had the "pleasure" of using AWS AppSync. I use quotes because while it is supremely powerful, it can also be quite cumbersome to use in practice due to the need to learn Apache Velocity Template Language (VTL) and the lack of good tooling support in my opinion.

That power comes from the ability to arbitrarily transform proxied requests and response in both directions using VTL.

You can easily see why this is tremendously powerful because it becomes a true unifying gateway that can fulfill a ton of use cases with very little code (if we do not consider VTL templates as code). For example:

Leaving aside the GQL aspect of AppSync for a moment, as far as I am aware, there is no analog to AppSync on Azure today.

Would love to see some pathway towards this capability in Azure as it would make building certain scenarios on Functions much more straightforward and performant (namely legacy API integration and Fowler's "Strangler Fig" pattern).