Azure函数输出对第三方服务的API调用 [英] Azure function output API call to 3rd party service

查看:56
本文介绍了Azure函数输出对第三方服务的API调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我仍然有点习惯Azure功能,并试图弄清楚如何在应用程序中应用它们.目前,我遇到的情况是,每当一条消息弹出队列时,我就使用Service Bus队列触发功能来激活它,然后在处理完该消息后,我想将请求发布到第三方API.

Hey all I'm still getting used to Azure functions a little bit and trying to figure out how we might apply them in our application. I've currently got a situation where I am using a Service Bus Queue Trigger function to activate whenever a message pops in the queue and I would then like to post a request to a 3rd party API when that message has been handled.

我了解使用Azure函数可以配置输出绑定,但是是否已经设置任何内容以对输出执行REST请求?我目前假设我们将必须包含RestSharp并在​​函数中自行格式化请求,但是有没有更简单的更好的方法呢?

I understand that with Azure functions I can configure an output binding but is there anything already setup to execute a REST request on output? I'm currently assuming that we are going to have to include RestSharp and format the request ourselves within the function but is there an easier better way to do this?

推荐答案

没有HTTP输出绑定,这就是您要描述的内容.请查看可用的输出绑定: https://docs.microsoft.com/zh-CN/azure/azure-functions/functions-triggers-bindings

There is no HTTP output binding, which is what you are describing. Please take a look at the available output bindings: https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings

一旦触发了功能,完成对第三方的调用的方法就是您所描述的:自己进行HTTP调用.

The way to accomplish a call to a third-party once your function is triggered, is exactly as you described it: Making an HTTP call yourself.

实际上,这是一个类似问题的答案: https://stackoverflow.com/a/39187578/84395

In fact, here is an answer to a similar question: https://stackoverflow.com/a/39187578/84395

这篇关于Azure函数输出对第三方服务的API调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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