ShoutLib.Shouter.PublishStatus C# (CSharp) Method

PublishStatus() private method

Posts a message back to the browser, via App Engine.
private PublishStatus ( string postStatusUrl, string postStatusToken, string status, string result = null ) : void
postStatusUrl string Where to post the status to?
postStatusToken string An additional value to post.
status string The status to report to the browser.
result string The result or error message to report to the browser.
return void
        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());
            }
        }