-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
39 lines (35 loc) · 1.1 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Text.Json;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace sni
{
class Program
{
private static HttpClient client;
static void Main(string[] args)
{
AsyncMain().Wait();
Console.WriteLine("Hello World!");
}
static async Task AsyncMain()
{
if (client == null)
{
// ServicePointManager.Expect100Continue = true;
// ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
client = new HttpClient();
}
/** var log = new Object();
var json = JsonSerializer.Serialize(log);
var content = new StringContent(json, Encoding.UTF8, "application/json");
**/
var response = await client.GetAsync(new Uri("https://dev--sni.debug.autocode.gg/"));
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
}