Example #1
0
 public static string GetString(string url)
 {
     try {
         var result = InternalUtils.CmGetData(url, UserAgent);
         return(result == null ? null : Encoding.UTF8.GetString(result));
     } catch (Exception e) {
         Logging.Warning($"Cannot read as UTF8 from {url}: " + e);
         return(null);
     }
 }
Example #2
0
 public static byte[] GetData(string url)
 {
     return(InternalUtils.CmGetData(url, UserAgent));
 }