Skip to content

Instantly share code, notes, and snippets.

@sshine
Created November 8, 2016 10:33
Show Gist options
  • Save sshine/3ecde62e83515e6da016ecec7fe95ee9 to your computer and use it in GitHub Desktop.
Save sshine/3ecde62e83515e6da016ecec7fe95ee9 to your computer and use it in GitHub Desktop.
using (WebClient webClient = new WebClient())
{
webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
byte[] request = System.Text.Encoding.UTF8.GetBytes("payload=" + JsonConvert.SerializeObject(message));
byte[] response = webClient.UploadData(this._webHookUri, "POST", request);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment