chore: remove all .history/DrApi_20241215* placeholder example source files

This commit is contained in:
2024-12-16 21:23:13 +00:00
commit b4dee95f23
230 changed files with 5558 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
static class HTTP {
private static readonly HttpClient client = new HttpClient(){
Timeout = TimeSpan.FromSeconds(10)
};
public static async Task<string> get(string url){
try
{
Console.WriteLine("SUCCESS\n " + url);
HttpResponseMessage response = await client.GetAsync(url,HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
Console.WriteLine("SUCCESS3\n " + url);
if (response.IsSuccessStatusCode)
{
string responseData = await response.Content.ReadAsStringAsync().ConfigureAwait(false);;
return responseData;
}
else
{
Console.WriteLine(response.StatusCode);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return null;
}
}