Skip to content

Instantly share code, notes, and snippets.

@yurkinh
yurkinh / gist:e14a3ea8724e186df5dc7b4b37bb6511
Last active January 19, 2024 10:41
Dev helper for establishing SSL connections to localhost on various platformsL ios, Android, Windows, Mac
using System.Net.Security;
using System.Net;
public class DevHttpsConnectionHelper
{
public DevHttpsConnectionHelper(int sslPort)
{
SslPort = sslPort;
DevServerRootUrl = FormattableString.Invariant($"https://{DevServerName}:{SslPort}");
_lazyHttpClient = new Lazy<HttpClient>(() => new HttpClient(GetPlatformMessageHandler()));