MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / Get

Method Get

plugins/cs/HttpMonitor/Program.cs:90–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 }
89
90 public List<string> Get()
91 {
92 List<string> result = new List<string>();
93 var request = CreateWebRequest(url);
94
95 try
96 {
97 using (WebResponse response = (HttpWebResponse)request.GetResponse())
98 {
99
100 var encoding = ASCIIEncoding.ASCII;
101 using (var reader = new System.IO.StreamReader(response.GetResponseStream(), encoding))
102 {
103 while (!reader.EndOfStream)
104 {
105 result.Add(reader.ReadLine());
106 }
107 }
108 }
109 }
110 catch (WebException e)
111 {
112 if (Settings.Verbose)
113 {
114 Util.DebugWrite(e.ToString());
115 }
116 else
117 {
118 Util.DebugWrite(e.Message);
119 }
120 Trace.WriteLine("--- HttpMonitor of '" + url + "' stopped ---");
121 throw;
122 }
123 return result;
124 }
125
126 private string url;
127 }

Callers

nothing calls this directly

Calls 2

DebugWriteMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected