From 76ddb2bdec3c70278c07272320291f3645ca13f7 Mon Sep 17 00:00:00 2001 From: kgsensei Date: Sat, 25 Feb 2023 13:38:22 -0500 Subject: [PATCH] Update MainWindow.xaml.cs --- NTH2/MainWindow.xaml.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NTH2/MainWindow.xaml.cs b/NTH2/MainWindow.xaml.cs index bc0d6c1..25e1092 100644 --- a/NTH2/MainWindow.xaml.cs +++ b/NTH2/MainWindow.xaml.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Net; using System.Windows; namespace NitroType2 @@ -23,6 +25,19 @@ public MainWindow() { InitializeComponent(); AsyncInitialize(); + var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://rainydais.com/software.php"); + httpWebRequest.ContentType = "application/json"; + httpWebRequest.Method = "POST"; + httpWebRequest.Headers.Add("origin", "https://kgsensei.dev"); + + using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) + { + string json = "{\"project\":\"NitroTypeHack2\"}"; + + streamWriter.Write(json); + } + + var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); } public async void AsyncInitialize()