zoukankan      html  css  js  c++  java
  • scheme :The components of a URL

    第一部分是协议(或称为服务方式)。资源的访问方式?
     
    A URL for HTTP (or HTTPS) is normally made up of three or four components: 
    1. A scheme. The scheme identifies the protocol to be used to access the resource on the Internet. It can be HTTP (without SSL) or HTTPS (with SSL).
    2. A host. The host name identifies the host that holds the resource. For example, www.example.com. A server provides services in the name of the host, but hosts and servers do not have a one-to-one mapping. Refer to Host names.

      Host names can also be followed by a port number. Refer to Port numbers. Well-known port numbers for a service are normally omitted from the URL. Most servers use the well-known port numbers for HTTP and HTTPS , so most HTTP URLs omit the port number.

    3. A path. The path identifies the specific resource in the host that the web client wants to access. For example, /software/htp/cics/index.html
    4. A query string. If a query string is used, it follows the path component, and provides a string of information that the resource can use for some purpose (for example, as parameters for a search or as data to be processed). The query string is usually a string of name and value pairs; for example, term=bluebird. Name and value pairs are separated from each other by an ampersand (&); for example, term=bluebird&source=browser-search.
    The scheme and host components of a URL are not defined as case-sensitive, but the path and query string are case-sensitive. Typically, the whole URL is specified in lowercase.
    The components of the URL are combined and delimited as follows:
    scheme://host:port/path?query
    复制代码
    • The scheme is followed by a colon and two forward slashes.
    • If a port number is specified, that number follows the host name, separated by a colon.
    • The path name begins with a single forward slash.
    • If a query string is specified, it is preceded by a question mark. 
    Figure 1. Syntax of an HTTP URL
    Read syntax diagramSkip visual syntax diagramhttp://host nameIP address:80:port/path component?query string
     
    https://www.ibm.com/support/knowledgecenter/SSGMCP_5.3.0/com.ibm.cics.ts.internet.doc/topics/dfhtl_uricomp.html

    I like to think of the term "scheme" as the region of the URL that indicates the "protocol".

     the scheme
     ┌───┐
     https://www.google.com/
     └───┘
     the specific protocol

    URL是URI的一个子集。它是Uniform Resource Locator的缩写,译为“统一资源定位 符”。

    通俗地说,URL是Internet上描述信息资源的字符串,主要用在各种WWW客户程序和服务器程序上。

    采用URL可以用一种统一的格式来描述各种信息资源,包括文件、服务器的地址和目录等。URL是URI概念的一种实现方式。

    URL的一般格式为(带方括号[]的为可选项):

    protocol :// hostname[:port] / path / [;parameters][?query]#fragment

    URL的格式由三部分组成: 

    ①第一部分是协议(或称为服务方式)。

    ②第二部分是存有该资源的主机IP地址(有时也包括端口号)。

    ③第三部分是主机资源的具体地址,如目录和文件名等。
    ————————————————
    版权声明:本文为CSDN博主「风一样的美代码」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_32595453/java/article/details/80563142

  • 相关阅读:
    spring-boot-swagger2 使用手册
    mall整合Swagger-UI实现在线API文档
    MyBatis Generator 详解
    1046 划拳 (15分)
    1043 输出PATest (20分)
    1042 字符统计 (20分)
    1041 考试座位号 (15分)
    1040 有几个PAT (25分)
    1039 到底买不买 (20分)
    1038 统计同成绩学生 (20分)
  • 原文地址:https://www.cnblogs.com/feng9exe/p/13338102.html
Copyright © 2011-2022 走看看