Example #1
0
 /// <summary>
 /// This method set the http headers 
 /// </summary>
 private void SetHttpHeaders(Dictionary<string, string> h, Windows.Web.Http.Headers.HttpRequestHeaderCollection hc)
 {
     try
     {
         if ((h != null) && (hc != null))
         {
             foreach (var var in h)
             {
                 LogMessage("Adding in the Http Header key: " + var.Key +" Value: " + var.Value);
                 hc.TryAppendWithoutValidation(var.Key, var.Value);
             }
         }
     }
     catch(Exception e)
     {
         LogMessage("Exception while setting the http headers: "+ e.Message);
     }
 }