URI格式

简介:
URI貌似属于比较基本的一种协议,虽然我经常记不住它的具体格式。今天在WIKI上看到一个比较详细的格式描述,所以copy下来保留,仅此而已。
出自:http://en.wikipedia.org/wiki/URI_scheme

< scheme  name > :  < hierarchical  part > [ ?  < query > ] [ #  < fragment > ]

The following figure displays two example URIs ( foo://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose  and urn:example:animal:ferret:nose ) and their component parts. (The examples are derived from RFC 3986 — STD 66, chapter 3).
  foo://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose
  \_/   \_______________/ \_________/ \__/            \___/ \_/ \______________________/ \__/
   |           |               |       |                |    |            |                |
   |       userinfo           host    port              |    |          query          fragment
   |    \________________________________/\_____________|____|/ \__/        \__/
 scheme                 |                          |    |    |    |          |
  name              authority                      |    |    |    |          |
   |                                             path   |    |    interpretable as keys
   |                                                    |    |
   |    \_______________________________________________|____|/       \____/     \_____/
   |                         |                          |    |          |           |
 scheme              hierarchical part                  |    |    interpretable as values
  name                                                  |    |
   |            path               interpretable as filename |
   |   ___________|____________                              |
  / \ /                        \                             |
  urn:example:animal:ferret:nose               interpretable as extension
                path
         _________|________
 scheme /                  \
  name  userinfo  hostname       query
  _|__   ___|__   ____|____   _____|_____
 /    \ /      \ /         \ /           \
 mailto:username@example.com?subject=Topic

相关文章
|
4月前
URL和URI
URL和URI
69 0
|
7月前
|
数据安全/隐私保护
URI 和URL 的区别是什么?
URI 和URL 的区别是什么?
553 0
|
编解码 网络协议 程序员
HTTP协议格式、URL格式及URL encode
HTTP协议格式、URL格式及URL encode
HTTP协议格式、URL格式及URL encode
|
Web App开发 存储 XML
http content-type常见文件格式类型
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/78710591 Conten...
2132 0