Skip to content

Instantly share code, notes, and snippets.

@jrusbatch
Created February 12, 2013 01:16
Show Gist options
  • Save jrusbatch/4759191 to your computer and use it in GitHub Desktop.
Save jrusbatch/4759191 to your computer and use it in GitHub Desktop.
using (var client = new HttpClient())
{
var authTokenBytes = Encoding.UTF8.GetBytes("auth_key:");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(authTokenBytes));
await client.PostAsync("https://push.ducksboard.com/v/widget_id", new { value = timer.ElapsedMilliseconds }, new JsonMediaTypeFormatter());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment