[私人小抄] Uri

Uri  小抄

名詞解釋

講解 URL 結構與分享幾個相對路徑與絕對路徑的開發技巧
MSDN - Uri 類別
你知道URL、URI和URN三者之间的区别吗
What is the difference between URI, URL and URN?/a>

Uri.Dump

Uri requestUri = new Uri("https://www.youtube.com/?gl=TW&hl=zh-TW");
requestUri.Dump();
AbsolutePath /
AbsoluteUri https://www.youtube.com/?gl=TW&hl=zh-TW
LocalPath /
Authority www.youtube.com
HostNameType Dns
IsDefaultPort True
IsFile False
IsLoopback False
PathAndQuery /?gl=TW&hl=zh-TW
Segments /
IsUnc False
Host www.youtube.com
Port 443
Query ?gl=TW&hl=zh-TW
Fragment  
Scheme https
OriginalString https://www.youtube.com/?gl=TW&hl=zh-TW
DnsSafeHost www.youtube.com
IdnHost www.youtube.com
IsAbsoluteUri True
UserEscaped False
UserInfo  

 

如果內容有誤請多鞭策謝謝