• /r/powershell
  • Update: Powershell and Clarity

    In the hopes that someone will find use from all of my digging, I’ve found (in the depths of some CA forum posts) some very usefull information on how to pull data from Clarity’s SOAP and XOG interface. I’ve posted a basic snippet below to help out future searchers: $report = “report_WSDL” $ws = New-WebServiceProxy […]

  • /r/csharp
  • retrying HTTP web request inside try/catch

    I have a function that may or may not require proxy authentication. public void PostNotification(string URL) { var updateRequest = HttpWebRequest.Create(URL) as HttpWebRequest; updateRequest.ContentLength = 0; updateRequest.ContentType = REQUEST_CONTENT_TYPE; updateRequest.Method = REQUEST_METHOD_TYPE; var postResponse = default(WebResponse); try { postResponse = updateRequest.GetResponse(); } catch (Exception ex) { Console.WriteLine(ex.Message); updateRequest.Proxy.Credentials = (System.Net.NetworkCredential)System.Net.CredentialCache.DefaultNetworkCredentials; postResponse = updateRequest.GetResponse(); } finally […]