This is my curl command:
curl --insecure https://api.github.com/user?access_token=xxx
Is there a way to convert this into a C# code? I've tried various solutions, but all failed. I think the problem is the --insecure parameter.
This is my code:
String goodUrl = "http://www.google.com";
String badUrl = "https://api.github.com/user?access_token=36905f6fffa42341c2e6fd12655295f2b4d25";
var json1 = new WebClient().DownloadString(goodUrl);
var json2 = new WebClient().DownloadString(badUrl);
GoodUrl is working fine, badUrl not. The error is "protocol violation".