Skip to content

Instantly share code, notes, and snippets.

@komainu85
Created January 14, 2016 18:48
Show Gist options
  • Save komainu85/103fb60107c542d56a49 to your computer and use it in GitHub Desktop.
Save komainu85/103fb60107c542d56a49 to your computer and use it in GitHub Desktop.
SitecoreSSCWindowsIoT.cs
IHttpContent content = new HttpStringContent(@"{ ""domain"": ""sitecore"", ""username"": ""admin"", ""password"": ""b"" }", UnicodeEncoding.Utf8, "application/json");
using (var client = new Windows.Web.Http.HttpClient.HttpClient())
{
var result = await client.PostAsync(new Uri("https://192.168.1.112/Sitecore/api/ssc/auth/login"), content);
result.EnsureSuccessStatusCode();
var authResult = await result.Content.ReadAsStringAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment