private void PublishStatus(string postStatusUrl, string postStatusToken,
string status, string result = null)
{
var content = new System.Net.Http.FormUrlEncodedContent(
new Dictionary<string, string>() {
{"status", status},
{"token", postStatusToken},
{"result", result},
{"host", System.Environment.MachineName}});
var httpPost = _init.HttpClient.PostAsync(postStatusUrl, content);
httpPost.Wait();
if (httpPost.Result.StatusCode != System.Net.HttpStatusCode.OK)
{
throw new FatalException(httpPost.Result.ToString());
}
}