This commit is contained in:
2025-02-03 14:58:49 +01:00
commit 13c26eb3d8
13 changed files with 818 additions and 0 deletions

21
Bokhantarare/Helper.cs Normal file
View File

@@ -0,0 +1,21 @@
using System.Net.Http;
using System.Net.Http.Headers;
namespace Bokhantarare;
public class Helper
{
public static string Request(string requestUrl)
{
HttpClient client = new HttpClient();
HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, requestUrl);
requestMessage.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
//Connect to the URL
HttpResponseMessage response = client.SendAsync(requestMessage).Result;
// Get the response
string Output = response.Content.ReadAsStringAsync().Result;
return Output;
}
}