Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 546 Bytes
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace worker
{
public static class SlackHelper
{
private static readonly HttpClient HttpClient = new HttpClient();
public static async Task SendSlackMessage(string message)
{
await HttpClient.PostAsync("https://hooks.slack.com/services/*******************", // Full url removed for obvious reasons ;)
new StringContent($@"{{ ""text"": ""{message}"" }}", Encoding.UTF8, "application/json"));
}
}
}
You can’t perform that action at this time.