简体   繁体   English

如何在 C# 中处理来自 slack 的斜杠命令发布请求

[英]How to handle slash command post requests from slack in C#

I am currently trying to setup a slack bot in C# using azure.我目前正在尝试使用 azure 在 C# 中设置一个松弛机器人。 I am new to interacting with http requests in C#, and am having trouble getting the post request from slack to work.我是新来与 C# 中的 http 请求进行交互,并且无法从 slack 中获取发布请求来工作。 When I call my slash commands in slack, I am met with an http_client_error and no other error information.当我在 slack 中调用我的斜杠命令时,我遇到了 http_client_error 并且没有其他错误信息。 Does anyone have any resources they could point me towards about working with slack commands in c#.有没有人有任何资源可以指点我在 c# 中使用松弛命令。 Any recent help would be much appreciated.任何最近的帮助将不胜感激。 I cannot program the bot in another language due to limitations of a dll I am using.由于我正在使用的 dll 的限制,我无法用另一种语言对机器人进行编程。 I guess the main question I have is how to handle http post requests from slack in C#.我想我的主要问题是如何处理来自 C# 中松弛的 http 发布请求。

When you give slack the link that it needs to send the HTTP Post to, make sure you have https:// at the start of the link.当您给 slack 发送 HTTP 帖子所需的链接时,请确保在链接的开头有 https://。

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

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