tls1.2 support in .net core
When you trying to support tls1.2 in .net core or porting existing application from .net 4.6, these might not work :-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
You need to make the change from this to WinHttpHandler.
First, you need to install nuget package.
Install-Package System.Net.Http.WinHttpHandler -Pre
Next you need to run dotnet build (somehow my VS2017 Express wasn't able to recognize this nuget package that i've ran)
Once you have done that, you should be able to write this piece of code.