前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >URI格式

URI格式

作者头像
心跳包
发布2020-08-31 11:05:51
9080
发布2020-08-31 11:05:51
举报
代码语言:javascript
复制
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

格式: http://user:pass@www.example.com:80/home/index.html?age=11#mask http:协议方案名 user:pass:登录信息(认证) www.example.com:服务器地址 80:端口号 /hone/index.html:文件路径 age=11:查询字符串 mask:片段标识符 协议方案名: http:、https:、ftp:等,在获取资源时要指定协议类型。 登录信息(认证): 指定用户名和密码作为从服务器端获取资源时必要的登录信息,此项是可选的。 服务器地址: 使用绝对URI必须指定待访问的服务器地址。 服务器端口号: 指定服务器连接的网络端口号,此项是可选的。 路径: 指定服务器上的文件路径来定位特定资源。格式为: /home/index.html 参数: 为应用程序提供访问资源所需的附加信息。 例如:ftp://127.27.27.27/pub/pic;type=d 查询字符串: 针对已指定的文件路径内的资源,可以使用查询字符串传入任意参数,此项是可选的。 片段标识符: 通常可标记出以获取资源中的子资源(文档内的某一个位置),此项是可选的。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-10-14 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档