Skip to content

Instantly share code, notes, and snippets.

@premsh
Last active November 12, 2015 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save premsh/51e83909c74193db7d7c to your computer and use it in GitHub Desktop.
Save premsh/51e83909c74193db7d7c to your computer and use it in GitHub Desktop.
using (var client = new HttpClient())
{
var message = new HttpRequestMessage(HttpMethod.Post, url);
message.Headers.Add("Authorization", authKey);
message.Headers.Add("Audit",auditKey);
message.Content = new StringContent(content, new UTF8Encoding(), "application/json");
var response = client.SendAsync(message).Result;
return response.Content.ReadAsStringAsync().Result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment