如何在 Azure 函数中调用另一个函数 [英] How to call another function with in an Azure function

查看:30
本文介绍了如何在 Azure 函数中调用另一个函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了3个函数如下

  1. 在数据库中创建用户
  2. 从数据库中获取用户
  3. 处理用户

在 [3] 函数中,我将调用 [2] 函数来获取使用 Azure 函数 url 的用户,如下所示:-

In [3] function, I will call [2] function to get users using Azure function url as below:-

https://hdidownload.azurewebsites.net/api/getusers

有没有其他方法可以在没有完整路径的另一个 Azure 函数中调用 Azure 函数?

Is there any other way to call Azure function with in another Azure function without full path as above?

推荐答案

Function Apps 中没有任何内置功能可以在不实际进行 HTTP 调用的情况下从其他函数调用一个 HTTP 函数.

There's nothing built-in in Function Apps to call one HTTP function from other functions without actually making the HTTP call.

对于简单的用例,我会坚持通过完整 URL 调用.

For simple use cases I would just stick to calling by full URL.

有关更高级的工作流程,请查看 持久函数,特别是函数链.

For more advanced workflows, have a look at Durable Functions, paticularly Function Chaining.

这篇关于如何在 Azure 函数中调用另一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆