Shouldn't it be double slashes:
var path = "http://mwo.smurfy-net.de/api/oauth2/token?grant_type=client_credentials&client_id=1&client_secret=2";
题
I currently have the below code, that throws an exception: UriFormatException: Invalid URI: The Authority/Host could not be parsed. on the WebRequest.Create line. What am I doing wrong?
var path = "http:/mwo.smurfy-net.de/api/oauth2/token?grant_type=client_credentials&client_id=1&client_secret=2";
var request = (HttpWebRequest)WebRequest.Create(path);
request.AllowAutoRedirect = false;
var response = request.GetResponse();
解决方案
Shouldn't it be double slashes:
var path = "http://mwo.smurfy-net.de/api/oauth2/token?grant_type=client_credentials&client_id=1&client_secret=2";