private string CallStringWS(string relativeURL, RequestComplexity pComplexity) { var requestUrl = _CurrentConnection.EndsWith("/") ? _CurrentConnection.Substring(0, _CurrentConnection.Length - 1) : _CurrentConnection; requestUrl += "/"; requestUrl += relativeURL.StartsWith("/") ? relativeURL.Substring(1) : relativeURL; try { return(_Client.DownloadPlainText(requestUrl, pComplexity)); } catch (WebException e) { LogHelper.Instance.LogError(e.Message); return(null); } }
private string CallStringWS(string relativeURL, RequestComplexity pComplexity) { var requestUrl = _CurrentConnection.EndsWith("/") ? _CurrentConnection.Substring(0, _CurrentConnection.Length - 1) : _CurrentConnection; requestUrl += "/"; requestUrl += relativeURL.StartsWith("/") ? relativeURL.Substring(1) : relativeURL; try { if (_Client.GetCookieContainer().Count > 0) { _Client.RemoveAuthenticationHeaders(CurrentApiKey); } return(_Client.DownloadPlainText(requestUrl, pComplexity)); } catch (WebException e) { LogHelper.Instance.LogError(e.Message); return(null); } }