为asp.net core 2.1创建Webhooks吗?请问是支持吗? [英] Creation of Webhooks for a asp.net core 2.1? Does is support it?

查看:67
本文介绍了为asp.net core 2.1创建Webhooks吗?请问是支持吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在asp.net core 2.1中创建自定义Webhooks作为发件人?我已经看到有som实现的库来接收webhooks.但是当您想成为发件人时,我找不到任何东西.

我只了解有关Webhooks的一些基本知识,也许我在看这个错误?因为我想成为发送者而不是接收者时遇到一些查找信息的麻烦?除了发送者"外,它还有别的名字吗?.

谢谢.

解决方案

"webhook"没有什么神奇之处.这只是服务器回叫客户端的术语(显然,它通常以相反的方式工作).简而言之,Webhook仅仅是在客户端"上设置的某些端点,在这种情况下,它实际上是Web服务器.例如,在ASP.NET Core中,这仅仅是对控制器的一个动作,它绑定到特定的路由.服务器"(即将被网络钩住的服务器)只是向该端点发出HTTP请求.

简而言之,没有任何框架或库,因为没有任何东西.如果您是需要挂机的人,那么您只需通过 HttpClient 向该端点发出请求.就这么简单.

Is it possible to create custom webhooks in asp.net core 2.1 as a sender? I have seen there is som implemented libraries for receiving webhooks. But I can't find anything for when you want to be the sender.

I only have some basic knowledge about webhooks, maybe I am looking at this wrong? Because I have some trouble finding information when I want to be the sender and not the receiver? Does it have another name than "sender"?.

Thanks.

解决方案

There's nothing magical about a "webhook". It's just a term for a server calling back to the client (it typically works the other way around, obviously). In short, a webhook is merely some endpoint set up on the "client", which in this case is actually a web server. In ASP.NET Core, that would be just an action on a controller, tied to a particular route, for instance. The "server", the one that's going to be hitting the webhook, is just making an HTTP request to that endpoint.

In short, there's no framework or library for this, because there's nothing to it. If you're the one that needs to hit a webhook, then you'll just make a request via HttpClient to that endpoint. Simple as that.

这篇关于为asp.net core 2.1创建Webhooks吗?请问是支持吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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