chore: remove all .history/DrApi_20241215* placeholder example source files
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void DrApi(string username, string password) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void (string username, string password) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void pony (string username, string password) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static void get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response.ToString());
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response.ToString());
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response.ToString());
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response.ToString());
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static string get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static string get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static string get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
return "";
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
return "";
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
return "";
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
return "";
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
Console.writeLine("AFTER GET");
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
Console.writeLine("AFTER GET");
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url);
|
||||||
|
Console.WriteLine("AFTER GET");
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using HtmlAgilityPack;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
class DrApi {
|
||||||
|
|
||||||
|
public static async Task<string> get_rants (string url) {
|
||||||
|
|
||||||
|
string response = await HTTP.get(url).ConfigureAwait(false);;
|
||||||
|
HtmlDocument doc = new HtmlDocument();
|
||||||
|
doc.LoadHtml(response);
|
||||||
|
var nodes = doc.DocumentNode.SelectNodes("//a");
|
||||||
|
//var nodes = doc.DocumentNode.SelectNodes("//a[contains(@class,'rantlist-content-col')");
|
||||||
|
//var nodes = doc.DocumentNode.SelectNodes("//div[contains(@class, 'rant-comment-row-widget')]");
|
||||||
|
foreach (var node in nodes) {
|
||||||
|
Console.WriteLine(node.GetAttributeValue("class","None"));
|
||||||
|
if(node.GetAttributeValue("class","None") == "rantlist-bglink"){
|
||||||
|
|
||||||
|
Console.WriteLine(node.InnerText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
|
||||||
|
string http_get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
string http_get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
string http_get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
string http_get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static string http_get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
// Create an instance of HttpClient
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send a GET request to the specified URL
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the response is successful (status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// Print the response to the console
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Handle the error if the status code is not successful
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle any exceptions (e.g., network errors)
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
Console.WriteLine(responseData);
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async string get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
Console.writeLine("SUCCESS\n");
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
Console.writeLine("SUCCESS\n");
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n");
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n");
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n");
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
|
||||||
|
private static readonly HttpClient client = new HttpClient();
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
static class HTTP {
|
||||||
|
|
||||||
|
private static readonly HttpClient client = new HttpClient();
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = client.GET(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = client.GET(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = client.Get(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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) // Set a timeout to avoid hanging
|
||||||
|
};
|
||||||
|
|
||||||
|
public static async Task<string> get(string url){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("SUCCESS\n " + url);
|
||||||
|
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
Console.WriteLine("SUCCESS3\n " + url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string responseData = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "zzz";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
// The URL of the API or website you want to make a request to
|
||||||
|
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("Error: " + response.StatusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "zzz";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
public class HttpHelper
|
||||||
|
{
|
||||||
|
// Reuse a static HttpClient for the entire application to prevent socket exhaustion
|
||||||
|
private static readonly HttpClient client = new HttpClient()
|
||||||
|
{
|
||||||
|
Timeout = TimeSpan.FromSeconds(10) // Set a timeout for the HTTP request
|
||||||
|
};
|
||||||
|
|
||||||
|
// Function to get the content of the URL
|
||||||
|
public static async Task<string> GetContentsAsync(string url)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send an HTTP GET request
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the request was successful (HTTP status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string and return it
|
||||||
|
string content = await response.Content.ReadAsStringAsync();
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Error: {response.StatusCode}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle exceptions (e.g., network issues, invalid URLs)
|
||||||
|
Console.WriteLine($"Exception: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
public class HttpHelper
|
||||||
|
{
|
||||||
|
// Reuse a static HttpClient for the entire application to prevent socket exhaustion
|
||||||
|
private static readonly HttpClient client = new HttpClient()
|
||||||
|
{
|
||||||
|
Timeout = TimeSpan.FromSeconds(10) // Set a timeout for the HTTP request
|
||||||
|
};
|
||||||
|
|
||||||
|
// Function to get the content of the URL
|
||||||
|
public static async Task<string> GetContentsAsync(string url)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Send an HTTP GET request
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
// Check if the request was successful (HTTP status code 200)
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
// Read the response content as a string and return it
|
||||||
|
string content = await response.Content.ReadAsStringAsync();
|
||||||
|
Console.WriteLine(content);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Error: {response.StatusCode}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Handle exceptions (e.g., network issues, invalid URLs)
|
||||||
|
Console.WriteLine($"Exception: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
http_get("https://devrant.com/feed/recent")
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Connsole.WriteLine(http_get("https://devrant.com/feed/recent"))
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Connsole.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Program(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void Program(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
public static class Program {
|
||||||
|
|
||||||
|
static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
public static class Program {
|
||||||
|
|
||||||
|
static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
public static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
public static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(http_get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(HTTP.get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(HTTP.get("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(devrant.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(devrant.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static void Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
public static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
Console.WriteLine("DID TASK2\n");
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent"));
|
||||||
|
Console.WriteLine("DID TASK2\n");
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent/"));
|
||||||
|
Console.WriteLine("DID TASK2\n");
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://devrant.com/feed/recent/"));
|
||||||
|
Console.WriteLine("DID TASK2\n");
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
partial class Program {
|
||||||
|
|
||||||
|
static async Task Main(string[] args){
|
||||||
|
Application.Init();
|
||||||
|
var window = new Window("My TEst");
|
||||||
|
window.SetDefaultSize(320,240);
|
||||||
|
window.DeleteEvent += (o,e) => Application.Quit();
|
||||||
|
Console.WriteLine("DID TASK\n");
|
||||||
|
Console.WriteLine(await DrApi.get_rants("https://www.google.nl"));
|
||||||
|
Console.WriteLine("DID TASK2\n");
|
||||||
|
|
||||||
|
window.ShowAll();
|
||||||
|
Application.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user