private bool SendMessage(string message, int timeout) { using (var client = new TimeoutWebClient(timeout)) { client.Headers.Add("X-ApiKey", _apiKey); client.Headers.Add("content-type", "application/json; charset=utf-8"); client.Encoding = System.Text.Encoding.UTF8; try { client.UploadString(RaygunSettings.Settings.ApiEndpoint, message); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(string.Format("Error Logging Exception to Raygun.io {0}", ex.Message)); return(false); } } return(true); }
private bool SendMessage(string message, int timeout) { using (var client = new TimeoutWebClient(timeout)) { client.Headers.Add("X-ApiKey", _apiKey); client.Headers.Add("content-type", "application/json; charset=utf-8"); client.Encoding = System.Text.Encoding.UTF8; try { client.UploadString(RaygunSettings.Settings.ApiEndpoint, message); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(string.Format("Error Logging Exception to Raygun.io {0}", ex.Message)); return false; } } return true; }