简体   繁体   English

在 asp.net mvc 应用程序中使用 webhook

[英]Consuming a webhook in asp.net mvc application

I am learning how to consume a webhook in ASP.Net MVC solution, the webhook can be from OneDrive, GitHub or Twilio (or anyone), but I am not able to find even a basic example of consuming webhooks.我正在学习如何在 ASP.Net MVC 解决方案中使用 webhook,webhook 可以来自 OneDrive、GitHub 或 Twilio(或任何人),但我什至找不到使用 webhook 的基本示例。 I tried different keyword and searched the web but I haven't found a basic tutorial for this.我尝试了不同的关键字并在网上搜索,但我还没有找到相关的基本教程。

I am willing to put the controller code of my MVC Project but I don't know how to consume webhooks.我愿意把我的MVC项目的控制器代码放上来,但我不知道如何使用webhooks。

I did my research and I could not find any basic example for consuming webhooks.我做了我的研究,但找不到任何使用 webhooks 的基本示例。 I am starting to wonder is there any synonym terms for webhooks I should be entering into a search engine?我开始想知道我应该输入搜索引擎的网络钩子有什么同义词吗?

Links I looked into: VS Hooks我查看的链接: VS Hooks

To listen a webhook you basically need a controller with some method that allows HttpPost request.要侦听 webhook,您基本上需要一个控制器,该控制器具有一些允许 HttpPost 请求的方法。 The system who fires the webhook must have some doc/config to know method name and params.触发 webhook 的系统必须有一些文档/配置才能知道方法名称和参数。 Usually you need a DNS or public ip to get the request通常你需要一个 DNS 或公共 ip 来获取请求

@Mate already answered this using example from https://ngrok.com/ @Mate 已经使用https://ngrok.com/ 中的示例回答了这个问题

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

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