简体   繁体   English

为asp.net core 2.1创建Webhooks吗? 请问是支持吗?

[英]Creation of Webhooks for a asp.net core 2.1? Does is support it?

Is it possible to create custom webhooks in asp.net core 2.1 as a sender? 是否可以在asp.net core 2.1中创建自定义webhooks作为发件人? I have seen there is som implemented libraries for receiving webhooks. 我已经看到有som实现的库来接收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? 我只有一些有关Webhooks的基本知识,也许我在看这个错误? 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". “ 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. 简而言之,Webhook仅仅是在“客户端”上设置的某些端点,在这种情况下,它实际上是Web服务器。 In ASP.NET Core, that would be just an action on a controller, tied to a particular route, for instance. 例如,在ASP.NET Core中,这仅仅是对控制器的一个动作,它绑定到特定的路由。 The "server", the one that's going to be hitting the webhook, is just making an HTTP request to that endpoint. “服务器”(即将被网络钩住)只是向该端点发出HTTP请求。

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. 如果您是需要连接一个Webhook的人,则只需通过HttpClient向该端点发出请求。 Simple as that. 就那么简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM