Skip to content

Commit 8570f61

Browse files
committed
#36: Test HTTPS connection in Hello World program, because TLS compatibility is most at risk when mixing older versions of operating systems, runtimes, OpenSSL, and glibc (such as .NET 8 on 32-bit Trixie)
1 parent d94fd4d commit 8570f61

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

HelloWorldRuntime/Program.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
using System.Runtime.InteropServices;
2-
3-
Console.WriteLine($"Hello from {RuntimeInformation.FrameworkDescription} {RuntimeInformation.RuntimeIdentifier} {RuntimeInformation.OSArchitecture} {(Environment.Is64BitOperatingSystem ? 64 : 32)}-bit");
1+
using System.Runtime.InteropServices;
2+
3+
Console.WriteLine(
4+
$"Hello from {RuntimeInformation.FrameworkDescription} {RuntimeInformation.RuntimeIdentifier} {RuntimeInformation.OSArchitecture} {(Environment.Is64BitOperatingSystem ? 64 : 32)}-bit");
5+
6+
using HttpClient httpClient = new();
7+
using HttpResponseMessage response = await httpClient.GetAsync("https://aldaviva.com/");
8+
response.EnsureSuccessStatusCode();
9+
Console.WriteLine($"HTTPS request OK (HTTP {response.Version})");

0 commit comments

Comments
 (0)