normalize(URI) -> NormalizedURI
OTP 21.0
類型:
URI = uri_string() | uri_map()
NormalizedURI = uri_string() | error()
轉變一個URI
使用基於語法的標準化定義為標準化形式RFC 3986.
該函數實現了 HTTP(S) 的大小寫標準化、percent-encoding 標準化、路徑段標準化和基於方案的標準化,並對 FTP、SSH、SFTP 和 TFTP 提供基本支持。
例子:
1> uri_string:normalize("/a/b/c/./../../g").
"/a/g"
2> uri_string:normalize(<<"mid/content=5/../6">>).
<<"mid/6">>
3> uri_string:normalize("http://localhost:80").
"http://localhost/"
4> uri_string:normalize(#{scheme => "http",port => 80,path => "/a/b/c/./../../g",
4> host => "localhost-örebro"}).
"http://localhost-%C3%B6rebro/a/g"
相關用法
- erlang normalize(URI, Options)用法及代碼示例
- erlang now用法及代碼示例
- erlang node用法及代碼示例
- erlang nodes(Arg, InfoOpts)用法及代碼示例
- erlang nth用法及代碼示例
- erlang nthtail用法及代碼示例
- erlang nativename(Path)用法及代碼示例
- erlang nc(File)用法及代碼示例
- erlang names(Host)用法及代碼示例
- erlang new()用法及代碼示例
- erlang next(Iterator)用法及代碼示例
- erlang next_codepoint(String :: unicode:chardata())用法及代碼示例
- erlang next_grapheme(String :: unicode:chardata())用法及代碼示例
- erlang nth_lexeme(String, N, SeparatorList)用法及代碼示例
- erlang nth(N, List)用法及代碼示例
- erlang nthtail(N, List)用法及代碼示例
- erlang new(Options :: array_opts())用法及代碼示例
- erlang new(Size :: integer() >= 0, Options :: array_opts())用法及代碼示例
- erlang names()用法及代碼示例
- erlang sin用法及代碼示例
- erlang cos用法及代碼示例
- erlang tan用法及代碼示例
- erlang asin用法及代碼示例
- erlang acos用法及代碼示例
- erlang atan用法及代碼示例
注:本文由純淨天空篩選整理自erlang.org大神的英文原創作品 normalize(URI) -> NormalizedURI。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。