0
我想獲取you tube視頻信息。所以我準備了網址,並把它作爲以下WPF:URI無效:無法確定URI的格式
String YouTubeVideoInfo = "www.youtube.com/get_video_info?video_id=" + FinalVideoId;
**WebRequest HttpWReq = (WebRequest)WebRequest.Create(YouTubeVideoInfo);**
WebResponse HttpWResp = (WebResponse)HttpWReq.GetResponse();
Stream stream = HttpWResp.GetResponseStream();
StreamReader reader = new StreamReader(stream);
string contents = reader.ReadToEnd();
但上面的代碼給錯誤。所以我只想知道是否有任何方法可以在不添加協議的情況下調用此URL(http,https)